aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2005-12-31 16:23:13 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2005-12-31 16:23:13 +0000
commitf50ad433e80064538325e82938f11d1bf0c0828c (patch)
treeba40ce80766a41ccc282a9bf4f9e8554a485f550 /bfd/elf32-sh.c
parent4cc603a56e6177048d05459af0a396132dd256e5 (diff)
downloadfsf-binutils-gdb-f50ad433e80064538325e82938f11d1bf0c0828c.zip
fsf-binutils-gdb-f50ad433e80064538325e82938f11d1bf0c0828c.tar.gz
fsf-binutils-gdb-f50ad433e80064538325e82938f11d1bf0c0828c.tar.bz2
* elf32-sh.c (sh_elf_relocate_section): Don't reset relocation
for R_SH_REL32 in shared objects if the symbol is locally called.
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r--bfd/elf32-sh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 4d1e280..4d07414 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -4693,7 +4693,8 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|| !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