mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
gas: put emul decls in emul.h
The individual struct emulation instances shouldn't be declared in a .c file; it and the producers of the symbols want to both see the declarations, so declarations and definitions don't go out of sync. Move these declarations to emul.h. While there also adjust the conditional around this_format: That symbol is never #define-d anywhere, and it's needed only when USE_EMULATIONS is defined. (Really, when obj-multi isn't in use, it also is effectively only ever written to.)
This commit is contained in:
parent
2ced0b79da
commit
c41215350b
4
gas/as.c
4
gas/as.c
@ -130,10 +130,6 @@ static long start_time;
|
||||
#ifdef USE_EMULATIONS
|
||||
#define EMULATION_ENVIRON "AS_EMULATION"
|
||||
|
||||
extern struct emulation mipsbelf, mipslelf, mipself;
|
||||
extern struct emulation i386coff, i386elf, i386aout;
|
||||
extern struct emulation crisaout, criself;
|
||||
|
||||
static struct emulation *const emulations[] = { EMULATIONS };
|
||||
static const int n_emulations = sizeof (emulations) / sizeof (emulations[0]);
|
||||
|
||||
|
@ -35,6 +35,10 @@ struct emulation
|
||||
|
||||
COMMON struct emulation * this_emulation;
|
||||
|
||||
extern struct emulation mipsbelf, mipslelf, mipself;
|
||||
extern struct emulation i386coff, i386elf, i386aout;
|
||||
extern struct emulation crisaout, criself;
|
||||
|
||||
extern void common_emul_init (void);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user