Commit Graph

151 Commits

Author SHA1 Message Date
Keith Kanios
c8ef68bba9 Hopefully it is actually fixed this time :P 2007-04-14 03:44:31 +00:00
Keith Kanios
3e7bb1e046 Fixed structure initialization issue. 2007-04-14 01:49:07 +00:00
Keith Kanios
a2e9b953f8 Refixed uninitialized data. 2007-04-14 01:44:35 +00:00
Keith Kanios
df12db1f13 Fixed uninitialized structure data. 2007-04-14 01:40:24 +00:00
Keith Kanios
c7ae18dba1 Placated unreferenced types. 2007-04-14 00:46:25 +00:00
Keith Kanios
93f2e9a5a1 c99 printf/fprintf compliance. 2007-04-14 00:10:59 +00:00
Keith Kanios
8b2a72881c Fixed obj_fwrite() declaration to match "static" definition. 2007-04-13 22:07:53 +00:00
Keith Kanios
68d52b7737 Added appropriate "void" prototypes. 2007-04-13 22:03:24 +00:00
Keith Kanios
2a3311b546 Replaced str(n)casecmp with more standard str(n)icmp. 2007-04-13 22:00:42 +00:00
H. Peter Anvin
c1494ac5ab Macroize any compiler-specific code; macros defined in "compiler.h"
Move anything compiler-specific to "compiler.h".

There was an unguarded use of __attribute__(()) in outmacho.c; also
require gcc 4+ for __builtin_ctlz().  Speed up the open-coded version, too.
2007-04-13 19:58:42 +00:00
Keith Kanios
a6dfa78b78 Fixed distinction between char and int8_t data types. 2007-04-13 16:47:53 +00:00
Keith Kanios
c1c5a2d96f Fixed c99 data-types after removal of typedefs. 2007-04-13 00:52:54 +00:00
H. Peter Anvin
038d861ede Remove obsolete types; add <inttypes.h> where needed; header fixes
- Remove obsolete types like "uint32"; use "uint32_t" consistently.
- Make sure we include <inttypes.h> where needed.
- Header file guards should be FOO_H or SUBDIR_FOO_H; _FOO_H infringes
  on the C implementation's namespace and should only be used when
  writing libc!
- Change a few "int8_t" back to "char" where appropriate.  There are
  a lot more places where that should be done, though.
- Clean up the check for getuid/getgid in rdoff/rdlar.h.
2007-04-12 16:54:50 +00:00
H. Peter Anvin
58421f9697 outmacho.c: Don't assume __builtin_ctzl exists for gcc < 4
__builtin_ctzl exists for all architectures on gcc 4, but not for all
versions of gcc 3 and lower.  For simplicity, make the cutoff gcc 4.
2007-04-12 16:12:09 +00:00
Keith Kanios
b7a89544d0 General push for x86-64 support, dubbed 0.99.00. 2007-04-12 02:40:54 +00:00
Eric Christopher
a5f0000db0 2006-02-02 Eric Christopher <echristo@apple.com>
Wade Tregaskis  <wtregaskis@apple.com>

	* output/outmacho.c (macho_cleanup): Depend on symbols
	existing.
2006-02-02 21:50:47 +00:00
Eric Christopher
5eb2d2b094 2005-12-08 Wade Tregaskis <wtregaskis@apple.com>
* nasm/nasm/output/outmacho.c (struct section): Added "align" field.
	(sectmap): Added ".rodata" section.
	(exact_log2): New.
	(macho_section): Added support for section attributes.
        "align=" and "data" specifically.
	(macho_write_segment): Write out section alignment to Mach-O file.
2005-12-09 00:27:26 +00:00
Eric Christopher
5547e191fe 2005-12-05 Eric Christopher <echristo@apple.com>
* nasm/nasm/output/outmacho.c (macho_write_section): Don't add
        section offset to the symbol to be relocated.
        (add_reloc): Update comment.
2005-12-05 23:17:17 +00:00
Eric Christopher
a485fbdd37 Added section attributes, in particular S_ATTR_SOME_INSTRUCTIONS and update .text.
Change symbols from saa to explicitly allocated.
macho_layout_symbols: new function to sort symbols and renumber.
adjust symtab output accordingly
fixup relocs after renumbering
add relocation debugging routines.
2005-10-07 22:30:56 +00:00
Eric Christopher
d3179b6ce0 Break macho_cleanup into separate functions. 2005-09-26 22:13:42 +00:00
Eric Christopher
5508a4c7fc Run misc/Nindent on outmacho.c 2005-09-22 21:41:17 +00:00
Eric Christopher
1b8a72ae7c Add basic support for Mach-O file format. 2005-09-22 21:22:33 +00:00
Frank Kotler
f3071da71e fix outobj.c bug - every 256th extern crashed nasm
-
2005-06-08 16:41:10 +00:00
Frank Kotler
02f05cebba Jindrich Novy's buffer overrun patch to outieee.c
-
2005-05-09 16:34:43 +00:00
H. Peter Anvin
e2c80181b6 Apply Nindent to all .c and .h files 2005-01-15 22:15:51 +00:00
Yuri Zaporogets
e0c059ab4e outrdf2.c now uses the same definitions of RDOFF2 format that RDOFF utils.
Export/import/common label size is increased from 33 to 64. Fixed the bug
that caused wrong behavior of rdfgetheaderrec() if label length was 32.
Changed error codes from numeric values to symbolic constants.
Moved some routines from rdfdump.c to rdoff.c. They will be utilized also
by rdfdisasm, which is being developed.
2004-09-15 06:54:34 +00:00
Frank Kotler
7c4dada951 fix as86 .bss handling per John Coffman's patch 2004-04-25 02:57:00 +00:00
Frank Kotler
b4a1735c47 Update rdoff 2003-12-12 06:18:07 +00:00
Stanislav Karchebny
d52236c00e Revert erroneous macro added and modify __OUTPUT_FORMAT__ to a string const 2003-09-25 11:43:28 +00:00
Stanislav Karchebny
5e8f36611f Consistency fix 2003-09-25 11:28:45 +00:00
Stanislav Karchebny
88a049aca1 Added _NASM_FORMAT_ macro 2003-09-24 10:30:56 +00:00
H. Peter Anvin
97b7e0a23a Fix list iterator 2003-09-12 20:49:25 +00:00
H. Peter Anvin
bb88d011e3 If we don't specify -g, actually suppress debugging output 2003-09-10 23:34:23 +00:00
Frank Kotler
243a37719b nasm_malloc-ize Martin's outelf.c stabs stuff 2003-09-06 05:48:16 +00:00
H. Peter Anvin
61ecdbb3a8 First attempt at fixing the stabs/ELF issue. 2003-09-06 00:50:27 +00:00
H. Peter Anvin
2b320bcab9 Restore the adjusted symbol id start 2003-07-10 00:40:33 +00:00
H. Peter Anvin
73320328c1 Generate stabs format debugging info for ELF 2003-07-09 19:11:10 +00:00
H. Peter Anvin
da4c3983b2 Quiet spurious gcc warning 2003-07-09 19:10:47 +00:00
Michael K. Ter Louw
fbf539dbd9 start/vstart/align/valign can now be >0x80000000 2003-07-09 08:10:22 +00:00
Frank Kotler
d9119b2e52 Fixed outbin.c to allow origin > 80000000h 2003-06-30 20:39:23 +00:00
Frank Kotler
6b8350cdea Mike's multisection outbin.c "align bug fix" 2003-02-04 07:11:20 +00:00
Frank Kotler
f17039406f Yuri's 12/3/2002 rdoff patches- 2002-12-04 00:49:37 +00:00
H. Peter Anvin
c9f57c24d0 Fixes from Bart Oldeman 2002-09-19 04:27:01 +00:00
H. Peter Anvin
bfebdb0a07 "const"-ipation fixes from Trevor Woerner 2002-09-12 02:23:54 +00:00
H. Peter Anvin
059647580c This is Jim's outcoff patch. 2002-06-07 20:42:22 +00:00
H. Peter Anvin
8215a54b21 Fix off-by-one error found when running theowl's test cases. 2002-05-26 23:48:09 +00:00
H. Peter Anvin
77a036e213 Make .rodata a recognized ELF section with default attributes 2002-05-17 04:51:10 +00:00
H. Peter Anvin
0a7a3b459c Change "const static" -> "static const" to keep gcc happy 2002-05-14 23:54:46 +00:00
H. Peter Anvin
310b3e165f Code cleanup fixes from Ed Beroset 2002-05-14 22:38:55 +00:00
H. Peter Anvin
8ff796d817 Fix from John Coffman to 16-bit OBJ format output. 2002-05-09 05:35:23 +00:00
H. Peter Anvin
8ac364139a NASM 0.98.30 2002-04-30 21:09:12 +00:00