2006-10-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3290
	* elflink.c (elf_link_add_object_symbols): Hide definitions in
	debug sections.

ld/testsuite/

2006-10-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3290
	* ld-elf/dummy.c: New file.
	* ld-elf/dwarf.exp: Likewise.
	* ld-elf/dwarf1.c: Likewise.
	* ld-elf/dwarf1.h: Likewise.
	* ld-elf/dwarf1.out: Likewise.
	* ld-elf/dwarf1main.c: Likewise.
This commit is contained in:
H.J. Lu
2006-10-19 02:40:14 +00:00
parent 2f4754876f
commit 92b7c7b6e9
9 changed files with 162 additions and 0 deletions

View File

@@ -4156,6 +4156,13 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
dynsym = TRUE;
}
if (definition && (sec->flags & SEC_DEBUGGING))
{
/* We don't want to make debug symbol dynamic. */
(*bed->elf_backend_hide_symbol) (info, h, TRUE);
dynsym = FALSE;
}
/* Check to see if we need to add an indirect symbol for
the default name. */
if (definition || h->root.type == bfd_link_hash_common)