debug symbol hiding

Alan Modra amodra@bigpond.net.au
Mon Nov 2 06:27:00 GMT 2009


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



More information about the Binutils mailing list