From e5b9d2dac01791ad870c003f13975615ae82db96 Mon Sep 17 00:00:00 2001 From: Keith Kanios Date: Thu, 16 Jul 2009 21:13:10 -0500 Subject: [PATCH 1/6] outform.h: update comments regarding macho32/macho64 --- output/outform.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/output/outform.h b/output/outform.h index 3dfbc9c7..391aabe0 100644 --- a/output/outform.h +++ b/output/outform.h @@ -45,9 +45,9 @@ * OF_ONLY -- only include specified object formats * OF_name -- ensure that output format 'name' is included * OF_NO_name -- remove output format 'name' - * OF_DOS -- ensure that 'obj', 'bin' & 'win32' are included. - * OF_UNIX -- ensure that 'aout', 'aoutb', 'coff', 'elf32' 'elf64' are in. - * OF_OTHERS -- ensure that 'bin', 'as86' & 'rdf' are in. + * OF_DOS -- ensure that 'obj', 'bin', 'win32' & 'win64' are included. + * OF_UNIX -- ensure that 'aout', 'aoutb', 'coff', 'elf32' & 'elf64' are in. + * OF_OTHERS -- ensure that 'bin', 'as86', 'rdf' 'macho32' & 'macho64' are in. * OF_ALL -- ensure that all formats are included. * note that this doesn't include 'dbg', which is * only really useful if you're doing development @@ -86,7 +86,7 @@ /* ====configurable info begins here==== */ /* formats configurable: - * bin,obj,elf32,elf64,aout,aoutb,coff,win32,as86,rdf2,macho */ + * bin,obj,elf32,elf64,aout,aoutb,coff,win32,as86,rdf2,macho32,macho64 */ /* process options... */ From 8a962b3efdc146688075c1c6e36b6bad7597d1c2 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 16 Jul 2009 22:32:33 -0400 Subject: [PATCH 2/6] BR 2822263: don't re-invoke ofmt->symdef() in pass2 unless "special" Before checkin aeb0e0e9f1e7e9b32a8f17f2259311f6e9207aa6 we would only invoke ofmt->symdef() for a common variable during pass 2 if that variable had "special" in the declaration. That checkin unintentionally changed that behavior. That doesn't mean that the pre-existing behavior is right, but this should at least fix the resulting regressions. This really warrants more investigation. Signed-off-by: H. Peter Anvin --- nasm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nasm.c b/nasm.c index a938aaae..8c7e271a 100644 --- a/nasm.c +++ b/nasm.c @@ -1368,7 +1368,8 @@ static void assemble_file(char *fname, StrList **depend_ptr) define_common(value, seg_alloc(), size, special, ofmt, report_error); } else if (pass0 == 2) { - ofmt->symdef(value, 0L, 0L, 3, special); + if (special) + ofmt->symdef(value, 0L, 0L, 3, special); } break; } From d1904c6cbbebd86da948e69fcdb16c4c03239b1c Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 16 Jul 2009 22:44:19 -0400 Subject: [PATCH 3/6] outcoff: this is COFF, not binary Fix error message in outcoff to say COFF, not binary format... Signed-off-by: H. Peter Anvin --- output/outcoff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/output/outcoff.c b/output/outcoff.c index 5a03bec5..044600fd 100644 --- a/output/outcoff.c +++ b/output/outcoff.c @@ -419,8 +419,8 @@ static void coff_deflabel(char *name, int32_t segment, int64_t offset, struct Symbol *sym; if (special) - error(ERR_NONFATAL, "binary format does not support any" - " special symbol types"); + error(ERR_NONFATAL, "COFF format does not support any" + " special symbol types", ofmt->name); if (name[0] == '.' && name[1] == '.' && name[2] != '@') { if (strcmp(name,WRT_IMAGEBASE)) From 892bafc9b1980a7c9a5f2f3f8c0735f1ebca62eb Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 16 Jul 2009 22:44:43 -0400 Subject: [PATCH 4/6] test/Makefile: add more output rules Add more output rules to be able to try things quickly. Signed-off-by: H. Peter Anvin --- test/Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/test/Makefile b/test/Makefile index 0b81fc79..2dcf2ebd 100644 --- a/test/Makefile +++ b/test/Makefile @@ -21,11 +21,23 @@ TESTS = $(wildcard *.asm) $(NASM) $(NASMOPT) -f elf64 -o $@ -l $*.lst $< %.obj: %.asm $(NASM) + $(NASM) $(NASMOPT) -f obj -o $@ -l $*.lst $< + +%.coff: %.asm $(NASM) + $(NASM) $(NASMOPT) -f coff -o $@ -l $*.lst $< + +%.win32: %.asm $(NASM) $(NASM) $(NASMOPT) -f win32 -o $@ -l $*.lst $< -%.obj64: %.asm $(NASM) +%.win64: %.asm $(NASM) $(NASM) $(NASMOPT) -f win64 -o $@ -l $*.lst $< +%.mo32: %.asm $(NASM) + $(NASM) $(NASMOPT) -f macho32 -o $@ -l $*.lst $< + +%.mo64: %.asm $(NASM) + $(NASM) $(NASMOPT) -f macho64 -o $@ -l $*.lst $< + %.dbg: %.asm $(NASM) $(NASM) $(NASMOPT) -f dbg -o $@ -l $*.lst $< @@ -44,7 +56,8 @@ diff: performtest.pl $(NASM) $(TESTS) $(PERL) performtest.pl --diff --nasm='$(NASM)' $(TESTS) clean: - rm -f *.com *.o *.o64 *.obj *.obj64 *.exe *.lst *.bin + rm -f *.com *.o *.o64 *.obj *.win32 *.win64 *.exe *.lst *.bin + rm -f *.dbg *.coff *.ith *.srec *.mo32 *.mo64 rm -rf testresults rm -f elftest elftest64 From a5fd1ca895f570d87a170a80eeea998c0de0affb Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 16 Jul 2009 22:46:34 -0400 Subject: [PATCH 5/6] outcoff: fix invalid reference to ofmt ofmt is a static in nasm.c (why?), not a global... Signed-off-by: H. Peter Anvin --- output/outcoff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/outcoff.c b/output/outcoff.c index 044600fd..b27cc94e 100644 --- a/output/outcoff.c +++ b/output/outcoff.c @@ -420,7 +420,7 @@ static void coff_deflabel(char *name, int32_t segment, int64_t offset, if (special) error(ERR_NONFATAL, "COFF format does not support any" - " special symbol types", ofmt->name); + " special symbol types"); if (name[0] == '.' && name[1] == '.' && name[2] != '@') { if (strcmp(name,WRT_IMAGEBASE)) From b2aae9441e96678253d3dbf4a80018a3871931bb Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 17 Jul 2009 00:35:58 -0400 Subject: [PATCH 6/6] NASM 2.07rc7 --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index 78202dba..0c032982 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.07rc6 +2.07rc7