Allow ELF32 to be invoked either as -f elf or -f elf32
authorChuck Crayne <ccrayne@users.sourceforge.net>
Sun, 29 Apr 2007 00:28:24 +0000 (00:28 +0000)
committerChuck Crayne <ccrayne@users.sourceforge.net>
Sun, 29 Apr 2007 00:28:24 +0000 (00:28 +0000)
outform.h
output/outelf32.c

index 92b646f..236fd54 100644 (file)
--- 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,
index c85dc0a..cc5bef8 100644 (file)
@@ -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)