From f50ad433e80064538325e82938f11d1bf0c0828c Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Sat, 31 Dec 2005 16:23:13 +0000 Subject: [PATCH] * elf32-sh.c (sh_elf_relocate_section): Don't reset relocation for R_SH_REL32 in shared objects if the symbol is locally called. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-sh.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 731ad0487e7..dc6be124f7f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2005-12-31 Valeriy E. Ushakov + Kaz Kojima + + * elf32-sh.c (sh_elf_relocate_section): Don't reset relocation + for R_SH_REL32 in shared objects if the symbol is locally called. + 2005-12-31 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Adjust relocs against diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 4d1e280881f..4d07414cd1b 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 -- 2.30.2