diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-07-12 12:53:49 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-07-12 12:55:24 -0700 |
commit | afa06137fa3d6de926134b4061c3ff4a74d212cf (patch) | |
tree | ddfb5182b1e0d06cfc731563cfdda2814b658cc5 /output/outelf64.c | |
parent | d0fbb7f0ab355fd4e73d1aab215a2aa387b615c3 (diff) | |
download | nasm-afa06137fa3d6de926134b4061c3ff4a74d212cf.tar.gz nasm-afa06137fa3d6de926134b4061c3ff4a74d212cf.tar.bz2 nasm-afa06137fa3d6de926134b4061c3ff4a74d212cf.zip |
Hash even backend-specific directives, unify null functions
Hash all directives, even the ones that are backend-specific,
and instead pass the backend an already-parsed directive number.
Furthermore, unify null functions across various backends.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'output/outelf64.c')
-rw-r--r-- | output/outelf64.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/output/outelf64.c b/output/outelf64.c index b797eb8..cf6e378 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -1483,13 +1483,14 @@ static int32_t elf_segbase(int32_t segment) return segment; } -static int elf_directive(char *directive, char *value, int pass) +static int elf_directive(enum directives directive, char *value, int pass) { bool err; int64_t n; char *p; - if (!strcmp(directive, "osabi")) { + switch (directive) { + case D_OSABI: if (pass == 2) return 1; /* ignore in pass 2 */ @@ -1516,9 +1517,10 @@ static int elf_directive(char *directive, char *value, int pass) elf_abiver = n; return 1; + + default: + return 0; } - - return 0; } static void elf_filename(char *inname, char *outname, efunc error) |