summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-10-03 03:41:56 +0000
committerAlan Modra <amodra@bigpond.net.au>2005-10-03 03:41:56 +0000
commit34ed07542263c6902ed0c7efe59a9b0346ececc0 (patch)
tree40328874fe3d00ce8139207cba3df81a192e23fc /bfd
parent29910e188860586ae6ee652fd78889f770ffaaee (diff)
downloadgdb-34ed07542263c6902ed0c7efe59a9b0346ececc0.tar.gz
* elf.c (_bfd_elf_get_synthetic_symtab): Set BSF_GLOBAL on
synthetic syms.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 598b950f9b8..683a88bd630 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-03 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (_bfd_elf_get_synthetic_symtab): Set BSF_GLOBAL on
+ synthetic syms.
+
2005-09-30 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am: Run "make dep-am".
diff --git a/bfd/elf.c b/bfd/elf.c
index fe4c8fdced8..b1b73a02f4c 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -8270,6 +8270,10 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd,
continue;
*s = **p->sym_ptr_ptr;
+ /* Undefined syms won't have BSF_LOCAL or BSF_GLOBAL set. Since
+ we are defining a symbol, ensure one of them is set. */
+ if ((s->flags & BSF_LOCAL) == 0)
+ s->flags |= BSF_GLOBAL;
s->section = plt;
s->value = addr - plt->vma;
s->name = names;