summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-09-09 10:16:15 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-09-09 10:16:15 -0700
commit45d6b618780b2b5d7adcdccc828a9826c603fb01 (patch)
treef893262aea5228d39acd3fd12e9a3fefaf180e93
parenta436e9bcab604724ab0db7bb9b6ca9009b173b8d (diff)
downloadnasm-45d6b618780b2b5d7adcdccc828a9826c603fb01.tar.gz
output: combine macros for the most generic output formats
Several output formats have a macro package that looks like: %define __SECT__ [section .text] %macro __NASM_CDecl__ 1 %endmacro Combine them all into a single macro package (generic.mac). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--output/generic.mac (renamed from output/outaout.mac)2
-rw-r--r--output/outaout.c6
-rw-r--r--output/outas86.c4
-rw-r--r--output/outas86.mac4
-rw-r--r--output/outmacho.mac4
-rw-r--r--output/outmacho32.c6
-rw-r--r--output/outmacho64.c4
7 files changed, 11 insertions, 19 deletions
diff --git a/output/outaout.mac b/output/generic.mac
index f00cb960..0a371ede 100644
--- a/output/outaout.mac
+++ b/output/generic.mac
@@ -1,4 +1,4 @@
-OUT: aout aoutb
+OUT: generic aout aoutb as86 macho macho32 macho64
%define __SECT__ [section .text]
%macro __NASM_CDecl__ 1
%endmacro
diff --git a/output/outaout.c b/output/outaout.c
index 48a2cffd..25f1c663 100644
--- a/output/outaout.c
+++ b/output/outaout.c
@@ -905,7 +905,7 @@ static void aout_filename(char *inname, char *outname, efunc error)
standard_extension(inname, outname, ".o", error);
}
-extern macros_t aout_stdmac[];
+extern macros_t generic_stdmac[];
static int aout_set_info(enum geninfo type, char **val)
{
@@ -923,7 +923,7 @@ struct ofmt of_aout = {
NULL,
null_debug_arr,
&null_debug_form,
- aout_stdmac,
+ generic_stdmac,
aout_init,
aout_set_info,
aout_out,
@@ -945,7 +945,7 @@ struct ofmt of_aoutb = {
NULL,
null_debug_arr,
&null_debug_form,
- aout_stdmac,
+ generic_stdmac,
aoutb_init,
aout_set_info,
aout_out,
diff --git a/output/outas86.c b/output/outas86.c
index b59fe6b3..ba49aa3f 100644
--- a/output/outas86.c
+++ b/output/outas86.c
@@ -603,7 +603,7 @@ static void as86_filename(char *inname, char *outname, efunc error)
standard_extension(inname, outname, ".o", error);
}
-extern macros_t as86_stdmac[];
+extern macros_t generic_stdmac[];
static int as86_set_info(enum geninfo type, char **val)
{
@@ -626,7 +626,7 @@ struct ofmt of_as86 = {
NULL,
null_debug_arr,
&null_debug_form,
- as86_stdmac,
+ generic_stdmac,
as86_init,
as86_set_info,
as86_out,
diff --git a/output/outas86.mac b/output/outas86.mac
deleted file mode 100644
index 1edf908c..00000000
--- a/output/outas86.mac
+++ /dev/null
@@ -1,4 +0,0 @@
-OUT: as86
-%define __SECT__ [section .text]
-%macro __NASM_CDecl__ 1
-%endmacro
diff --git a/output/outmacho.mac b/output/outmacho.mac
deleted file mode 100644
index 58a7c423..00000000
--- a/output/outmacho.mac
+++ /dev/null
@@ -1,4 +0,0 @@
-OUT: macho macho32 macho64
-%define __SECT__ [section .text]
-%macro __NASM_CDecl__ 1
-%endmacro
diff --git a/output/outmacho32.c b/output/outmacho32.c
index a3b01315..6b6cfaba 100644
--- a/output/outmacho32.c
+++ b/output/outmacho32.c
@@ -717,7 +717,7 @@ static void macho_filename(char *inname, char *outname, efunc error)
standard_extension(inname, outname, ".o", error);
}
-extern macros_t macho_stdmac[];
+extern macros_t generic_stdmac[];
/* Comparison function for qsort symbol layout. */
static int layout_compare (const struct symbol **s1,
@@ -1312,7 +1312,7 @@ struct ofmt of_macho32 = {
NULL,
null_debug_arr,
&null_debug_form,
- macho_stdmac,
+ generic_stdmac,
macho_init,
macho_setinfo,
macho_output,
@@ -1330,7 +1330,7 @@ struct ofmt of_macho = {
NULL,
null_debug_arr,
&null_debug_form,
- macho_stdmac,
+ generic_stdmac,
macho_init,
macho_setinfo,
macho_output,
diff --git a/output/outmacho64.c b/output/outmacho64.c
index 79b6a451..0e4d991c 100644
--- a/output/outmacho64.c
+++ b/output/outmacho64.c
@@ -763,7 +763,7 @@ static void macho_filename(char *inname, char *outname, efunc error)
standard_extension(inname, outname, ".o", error);
}
-extern macros_t macho_stdmac[];
+extern macros_t generic_stdmac[];
/* Comparison function for qsort symbol layout. */
static int layout_compare (const struct symbol **s1,
@@ -1375,7 +1375,7 @@ struct ofmt of_macho64 = {
NULL,
null_debug_arr,
&null_debug_form,
- macho_stdmac,
+ generic_stdmac,
macho_init,
macho_setinfo,
macho_output,