From: Chuck Crayne Date: Sun, 29 Apr 2007 00:28:24 +0000 (+0000) Subject: Allow ELF32 to be invoked either as -f elf or -f elf32 X-Git-Tag: nasm-2.11.05~2094 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c270b7fe2b22794c7109f52d815afe9fd33a5c6;p=platform%2Fupstream%2Fnasm.git Allow ELF32 to be invoked either as -f elf or -f elf32 --- diff --git a/outform.h b/outform.h index 92b646f..236fd54 100644 --- a/outform.h +++ b/outform.h @@ -216,6 +216,7 @@ extern struct ofmt of_aout; extern struct ofmt of_aoutb; extern struct ofmt of_coff; extern struct ofmt of_elf32; +extern struct ofmt of_elf; extern struct ofmt of_elf64; extern struct ofmt of_as86; extern struct ofmt of_obj; @@ -241,6 +242,7 @@ struct ofmt *drivers[] = { #endif #ifdef OF_ELF32 &of_elf32, + &of_elf, #endif #ifdef OF_ELF64 &of_elf64, diff --git a/output/outelf32.c b/output/outelf32.c index c85dc0a..cc5bef8 100644 --- a/output/outelf32.c +++ b/output/outelf32.c @@ -107,6 +107,7 @@ static struct Symbol *fwds; static char elf_module[FILENAME_MAX]; extern struct ofmt of_elf32; +extern struct ofmt of_elf; #define SHN_ABS 0xFFF1 #define SHN_COMMON 0xFFF2 @@ -1272,7 +1273,7 @@ struct dfmt *elf32_debugs_arr[2] = { &df_stabs, NULL }; struct ofmt of_elf32 = { "ELF32 (i386) object files (e.g. Linux)", - "elf", + "elf32", NULL, elf32_debugs_arr, &null_debug_form, @@ -1288,6 +1289,23 @@ struct ofmt of_elf32 = { elf_cleanup }; +struct ofmt of_elf = { + "ELF (short name for ELF32) ", + "elf", + NULL, + elf32_debugs_arr, + &null_debug_form, + elf_stdmac, + elf_init, + elf_set_info, + elf_out, + elf_deflabel, + elf_section_names, + elf_segbase, + elf_directive, + elf_filename, + elf_cleanup +}; /* again, the stabs debugging stuff (code) */ void stabs32_init(struct ofmt *of, void *id, FILE * fp, efunc error)