diff options
author | Alan Modra <amodra@gmail.com> | 2000-01-26 22:48:31 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2000-01-26 22:48:31 +0000 |
commit | 4c63da97a708e211a7141e29082ab589cbdbcb12 (patch) | |
tree | 358dbdc4c6eaed6b8a498fa02100a861d33849fd /gas/symbols.c | |
parent | f743149ecb74d161c7be3171d36bafc805473ebc (diff) | |
download | gdb-4c63da97a708e211a7141e29082ab589cbdbcb12.zip gdb-4c63da97a708e211a7141e29082ab589cbdbcb12.tar.gz gdb-4c63da97a708e211a7141e29082ab589cbdbcb12.tar.bz2 |
This set of patches add support for aout emulation on the x86
assembler. ie. You will be able to do "as --em=i386aout" on an x86
linux-elf assembler to generate aout format object files, rather than
using a separate assembler. The aout emulation is enabled by giving
"--enable-targets=i386-linuxaout" to configure.
Oh yeah, there's a couple of fixes too. Error messages shouldn't be
passed to printf in the format arg just in case someone puts a `%' in
the message.
Diffstat (limited to 'gas/symbols.c')
-rw-r--r-- | gas/symbols.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/gas/symbols.c b/gas/symbols.c index 60decd8..1e0f190 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -1,5 +1,5 @@ /* symbols.c -symbol table- - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -437,18 +437,24 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */ } else { -#if defined (S_GET_OTHER) && defined (S_GET_DESC) - as_fatal (_("Symbol \"%s\" is already defined as \"%s\"/%d.%d.%ld."), - sym_name, - segment_name (S_GET_SEGMENT (symbolP)), - S_GET_OTHER (symbolP), S_GET_DESC (symbolP), - (long) S_GET_VALUE (symbolP)); +#if (!defined (OBJ_AOUT) && !defined (OBJ_MAYBE_AOUT) \ + && !defined (OBJ_BOUT) && !defined (OBJ_MAYBE_BOUT)) + static const char *od_buf = ""; #else - as_fatal (_("Symbol \"%s\" is already defined as \"%s\"/%ld."), + char od_buf[100]; + od_buf[0] = '\0'; +#ifdef BFD_ASSEMBLER + if (OUTPUT_FLAVOR == bfd_target_aout_flavour) +#endif + sprintf(od_buf, "%d.%d.", + S_GET_OTHER (symbolP), + S_GET_DESC (symbolP)); +#endif + as_fatal (_("Symbol \"%s\" is already defined as \"%s\"/%s%ld."), sym_name, segment_name (S_GET_SEGMENT (symbolP)), + od_buf, (long) S_GET_VALUE (symbolP)); -#endif } } /* if the undefined symbol has no value */ } |