aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-01-26 22:48:31 +0000
committerAlan Modra <amodra@gmail.com>2000-01-26 22:48:31 +0000
commit4c63da97a708e211a7141e29082ab589cbdbcb12 (patch)
tree358dbdc4c6eaed6b8a498fa02100a861d33849fd /gas/read.c
parentf743149ecb74d161c7be3171d36bafc805473ebc (diff)
downloadfsf-binutils-gdb-4c63da97a708e211a7141e29082ab589cbdbcb12.zip
fsf-binutils-gdb-4c63da97a708e211a7141e29082ab589cbdbcb12.tar.gz
fsf-binutils-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/read.c')
-rw-r--r--gas/read.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/gas/read.c b/gas/read.c
index b64203b..9f61e7e 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -1,5 +1,5 @@
/* read.c - read a source file -
- Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright (C) 1986, 87, 1990-99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -870,7 +870,7 @@ read_a_source_file (name)
if (check_macro (s, &out, '\0', &err))
{
if (err != NULL)
- as_bad (err);
+ as_bad ("%s", err);
*input_line_pointer++ = c;
input_scrub_include_sb (&out,
input_line_pointer);
@@ -2057,12 +2057,17 @@ s_lcomm_internal (needs_align, bytes_p)
*p = c;
if (
-#if defined(OBJ_AOUT) | defined(OBJ_BOUT)
- S_GET_OTHER (symbolP) == 0 &&
- S_GET_DESC (symbolP) == 0 &&
-#endif /* OBJ_AOUT or OBJ_BOUT */
- (S_GET_SEGMENT (symbolP) == bss_seg
- || (!S_IS_DEFINED (symbolP) && S_GET_VALUE (symbolP) == 0)))
+#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT) \
+ || defined (OBJ_BOUT) || defined (OBJ_MAYBE_BOUT))
+#ifdef BFD_ASSEMBLER
+ (OUTPUT_FLAVOR != bfd_target_aout_flavour
+ || (S_GET_OTHER (symbolP) == 0 && S_GET_DESC (symbolP) == 0)) &&
+#else
+ (S_GET_OTHER (symbolP) == 0 && S_GET_DESC (symbolP) == 0) &&
+#endif
+#endif
+ (S_GET_SEGMENT (symbolP) == bss_seg
+ || (!S_IS_DEFINED (symbolP) && S_GET_VALUE (symbolP) == 0)))
{
char *pfrag;