2005-12-31 Valeriy E. Ushakov <uwe@NetBSD.org>

Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* elf32-sh.c (sh_elf_relocate_section): Don't reset relocation
	for R_SH_REL32 in shared objects if the symbol is locally called.

Makes hidden and protected symbols in shared objects work.
This will be committed to the binutils mainline.
This commit is contained in:
uwe 2005-12-31 16:23:59 +00:00
parent bcb3f4c7e6
commit 384a271baa

View File

@ -4887,7 +4887,8 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
&& ((r_type == R_SH_DIR32
&& (h->elf_link_hash_flags
& ELF_LINK_FORCED_LOCAL) == 0)
|| r_type == R_SH_REL32)
|| (r_type == R_SH_REL32
&& !SYMBOL_CALLS_LOCAL (info, h)))
&& ((input_section->flags & SEC_ALLOC) != 0
/* DWARF will emit R_SH_DIR32 relocations in its
sections against symbols defined externally