This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
debug symbol hiding
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 2 Nov 2009 16:57:12 +1030
- Subject: debug symbol hiding
- References: <D99BED9F-79F2-4DED-81ED-50D4BFC2BE40@adacore.com> <0BDAACE8-AC5C-4FDC-B647-B95CC534B5D6@adacore.com> <4A9FE8B7.4070403@analog.com> <4AA09EB1.4030408@analog.com> <DAE303E3-6A8C-4BB9-8370-6517BFEFAE86@adacore.com> <20090904135833.GT518@bubble.grove.modra.org> <20090906211255.N45550@dair.pair.com>
On Sun, Sep 06, 2009 at 09:27:46PM -0400, Hans-Peter Nilsson wrote:
> To fix that, I think I need to know if a symbol in a
> debug-section, which is global in the input, should always be
> forced local (or just non-dynamic).
>
> That's what elf_link_add_object_symbols /
> _bfd_elf_link_hash_hide_symbol does. Either that's wrong (i.e.
> it should only be forced non-dynamic, not also local), or the
> generic linker is wrong for not doing that too, in the name of
> consistency (to ld-mmix/sec-6m.d).
Let's make them consistent, and correct IMO.
2009-11-02 Alan Modra <amodra@bigpond.net.au>
* elflink.c (elf_link_add_object_symbols): Don't force debug
symbols local.
Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.357
diff -u -p -r1.357 elflink.c
--- bfd/elflink.c 13 Oct 2009 04:06:20 -0000 1.357
+++ bfd/elflink.c 2 Nov 2009 00:49:08 -0000
@@ -4373,7 +4373,6 @@ error_free_dyn:
if (definition && (sec->flags & SEC_DEBUGGING) && !info->relocatable)
{
/* We don't want to make debug symbol dynamic. */
- (*bed->elf_backend_hide_symbol) (info, h, TRUE);
dynsym = FALSE;
}
--
Alan Modra
Australia Development Lab, IBM