* elf.c (_bfd_elf_get_synthetic_symtab): Set BSF_GLOBAL on
authorAlan Modra <amodra@gmail.com>
Mon, 3 Oct 2005 03:41:56 +0000 (03:41 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 3 Oct 2005 03:41:56 +0000 (03:41 +0000)
synthetic syms.

bfd/ChangeLog
bfd/elf.c

index 598b950f9b8fb4f4c12a500ff59b6034d53db12b..683a88bd63007f1c5b2b8730afae9dc722d28d2e 100644 (file)
@@ -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".
index fe4c8fdced8c78f651e56bd8f9a46888c6ba1527..b1b73a02f4cad468e3bc3e9aa7c73263fdb570ba 100644 (file)
--- 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;