aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-10-16 14:42:15 +0000
committerNick Clifton <nickc@redhat.com>2007-10-16 14:42:15 +0000
commit504b7d2026f1fbbe912b6f513c069c0d47ba2505 (patch)
treeaa3186b5ab4a002cd64900af269e99d41031d584 /bfd/elf.c
parent62c018fe4a6de89d710e84b7efffe2462fa435cd (diff)
downloadgdb-504b7d2026f1fbbe912b6f513c069c0d47ba2505.zip
gdb-504b7d2026f1fbbe912b6f513c069c0d47ba2505.tar.gz
gdb-504b7d2026f1fbbe912b6f513c069c0d47ba2505.tar.bz2
Support the use of the STT_COMMON type. (In source and object files only at the moment)
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index b5b51d0..8aac231 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6297,7 +6297,11 @@ 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, type);
+ sym.st_info = ELF_ST_INFO (STB_GLOBAL,
+#ifdef USE_STT_COMMON
+ type == STT_OBJECT ? STT_COMMON :
+#endif
+ type);
else if (bfd_is_und_section (syms[idx]->section))
sym.st_info = ELF_ST_INFO (((flags & BSF_WEAK)
? STB_WEAK