This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch committed] Fix R_SH_REL32 handling for protected symbol
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: binutils at sources dot redhat dot com
- Cc: "Valeriy E. Ushakov" <uwe at NetBSD dot org>
- Date: Sun, 01 Jan 2006 01:24:22 +0900 (JST)
- Subject: [patch committed] Fix R_SH_REL32 handling for protected symbol
Hi,
I've committed the attached one-liner on mainline according to
the patch proposed by Valeriy E. Ushakov to fix a problem for
the protected symbol with SH linker. It's tested with the top
level "make -k check" on sh4-unknown-linux-gnu and glibc build
with no new faiulres.
Regards,
kaz
--
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.
--- ORIG/src/bfd/elf32-sh.c 2005-10-28 09:34:07.000000000 +0900
+++ LOCAL/src/bfd/elf32-sh.c 2005-12-31 22:36:42.000000000 +0900
@@ -4693,7 +4693,8 @@ sh_elf_relocate_section (bfd *output_bfd
|| !h->def_regular)
&& ((r_type == R_SH_DIR32
&& !h->forced_local)
- || 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