mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-12 18:40:23 +08:00
Allow ELF32 to be invoked either as -f elf or -f elf32
This commit is contained in:
parent
6e61733e38
commit
1c270b7fe2
@ -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,
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user