This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Tweak ELF synthetic syms
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Mon, 3 Oct 2005 13:10:34 +0930
- Subject: Tweak ELF synthetic syms
See http://sources.redhat.com/ml/gdb-patches/2005-10/msg00014.html
* elf.c (_bfd_elf_get_synthetic_symtab): Set BSF_GLOBAL on
synthetic syms.
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.312
diff -u -p -r1.312 elf.c
--- bfd/elf.c 28 Sep 2005 14:53:23 -0000 1.312
+++ bfd/elf.c 3 Oct 2005 03:38:41 -0000
@@ -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;
--
Alan Modra
IBM OzLabs - Linux Technology Centre