summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2008-02-17 23:45:23 +0000
committerMark Kettenis <kettenis@gnu.org>2008-02-17 23:45:23 +0000
commit940ab4f2848d338940b15d25aa8dc2a3b2ad39f7 (patch)
treefa91f5044062ca508be86e1dcd575a7a64ee7723
parent33df6ab513556c1470142cd998fba6ab323982ea (diff)
downloadbinutils-redhat-940ab4f2848d338940b15d25aa8dc2a3b2ad39f7.tar.gz
* elf.c (swap_out_syms): Avoid preprocessing directive within
macro arg.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 086b4b1096..ca3b5e5aaa 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-17 Mark Kettenis <kettenis@gnu.org>
+
+ * elf.c (swap_out_syms): Avoid preprocessing directive within
+ macro arg.
+
2008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* elf.c (assign_file_positions_for_load_sections): Set the type of
diff --git a/bfd/elf.c b/bfd/elf.c
index cce7163605..b0030c7473 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6378,11 +6378,15 @@ Unable to find equivalent output section for symbol '%s' from section '%s'"),
sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
}
else if (bfd_is_com_section (syms[idx]->section))
- sym.st_info = ELF_ST_INFO (STB_GLOBAL,
+ {
#ifdef USE_STT_COMMON
- type == STT_OBJECT ? STT_COMMON :
+ if (type == STT_OBJECT)
+ sym.st_info = ELF_ST_INFO (STB_GLOBAL, STT_COMMON);
+ else
+#else
+ sym.st_info = ELF_ST_INFO (STB_GLOBAL, type);
#endif
- type);
+ }
else if (bfd_is_und_section (syms[idx]->section))
sym.st_info = ELF_ST_INFO (((flags & BSF_WEAK)
? STB_WEAK