Allow ELF32 to be invoked either as -f elf or -f elf32
This commit is contained in:
parent
6e61733e38
commit
1c270b7fe2
2 changed files with 21 additions and 1 deletions
|
@ -216,6 +216,7 @@ extern struct ofmt of_aout;
|
||||||
extern struct ofmt of_aoutb;
|
extern struct ofmt of_aoutb;
|
||||||
extern struct ofmt of_coff;
|
extern struct ofmt of_coff;
|
||||||
extern struct ofmt of_elf32;
|
extern struct ofmt of_elf32;
|
||||||
|
extern struct ofmt of_elf;
|
||||||
extern struct ofmt of_elf64;
|
extern struct ofmt of_elf64;
|
||||||
extern struct ofmt of_as86;
|
extern struct ofmt of_as86;
|
||||||
extern struct ofmt of_obj;
|
extern struct ofmt of_obj;
|
||||||
|
@ -241,6 +242,7 @@ struct ofmt *drivers[] = {
|
||||||
#endif
|
#endif
|
||||||
#ifdef OF_ELF32
|
#ifdef OF_ELF32
|
||||||
&of_elf32,
|
&of_elf32,
|
||||||
|
&of_elf,
|
||||||
#endif
|
#endif
|
||||||
#ifdef OF_ELF64
|
#ifdef OF_ELF64
|
||||||
&of_elf64,
|
&of_elf64,
|
||||||
|
|
|
@ -107,6 +107,7 @@ static struct Symbol *fwds;
|
||||||
static char elf_module[FILENAME_MAX];
|
static char elf_module[FILENAME_MAX];
|
||||||
|
|
||||||
extern struct ofmt of_elf32;
|
extern struct ofmt of_elf32;
|
||||||
|
extern struct ofmt of_elf;
|
||||||
|
|
||||||
#define SHN_ABS 0xFFF1
|
#define SHN_ABS 0xFFF1
|
||||||
#define SHN_COMMON 0xFFF2
|
#define SHN_COMMON 0xFFF2
|
||||||
|
@ -1272,7 +1273,7 @@ struct dfmt *elf32_debugs_arr[2] = { &df_stabs, NULL };
|
||||||
|
|
||||||
struct ofmt of_elf32 = {
|
struct ofmt of_elf32 = {
|
||||||
"ELF32 (i386) object files (e.g. Linux)",
|
"ELF32 (i386) object files (e.g. Linux)",
|
||||||
"elf",
|
"elf32",
|
||||||
NULL,
|
NULL,
|
||||||
elf32_debugs_arr,
|
elf32_debugs_arr,
|
||||||
&null_debug_form,
|
&null_debug_form,
|
||||||
|
@ -1288,6 +1289,23 @@ struct ofmt of_elf32 = {
|
||||||
elf_cleanup
|
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) */
|
/* again, the stabs debugging stuff (code) */
|
||||||
|
|
||||||
void stabs32_init(struct ofmt *of, void *id, FILE * fp, efunc error)
|
void stabs32_init(struct ofmt *of, void *id, FILE * fp, efunc error)
|
||||||
|
|
Loading…
Reference in a new issue