diff options
Diffstat (limited to 'bfd/elf64-sh64.c')
-rw-r--r-- | bfd/elf64-sh64.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c index b168934..91762fa 100644 --- a/bfd/elf64-sh64.c +++ b/bfd/elf64-sh64.c @@ -1342,8 +1342,8 @@ sh_elf64_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd, return bfd_reloc_undefined; if (bfd_is_com_section (symbol_in->section)) - sym_value = 0; - else + sym_value = 0; + else sym_value = (symbol_in->value + symbol_in->section->output_section->vma + symbol_in->section->output_offset); @@ -1614,7 +1614,7 @@ sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section, sec = h->root.u.def.section; /* In these cases, we don't need the relocation value. We check specially because in some obscure cases - sec->output_section will be NULL. */ + sec->output_section will be NULL. */ if (r_type == R_SH_GOTPC_LOW16 || r_type == R_SH_GOTPC_MEDLOW16 || r_type == R_SH_GOTPC_MEDHI16 @@ -1756,7 +1756,7 @@ sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section, skip = true; else if (outrel.r_offset == (bfd_vma) -2) skip = true, relocate = true; - + outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -2507,7 +2507,7 @@ sh_elf64_gc_sweep_hook (abfd, info, sec, relocs) /* Look through the relocs for a section during the first phase. Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ - + static boolean sh_elf64_check_relocs (abfd, info, sec, relocs) bfd *abfd; @@ -2537,7 +2537,7 @@ sh_elf64_check_relocs (abfd, info, sec, relocs) sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf64_External_Sym); if (!elf_bad_symtab (abfd)) sym_hashes_end -= symtab_hdr->sh_info; - + dynobj = elf_hash_table (info)->dynobj; local_got_offsets = elf_local_got_offsets (abfd); @@ -2546,13 +2546,13 @@ sh_elf64_check_relocs (abfd, info, sec, relocs) { struct elf_link_hash_entry *h; unsigned long r_symndx; - + r_symndx = ELF64_R_SYM (rel->r_info); if (r_symndx < symtab_hdr->sh_info) h = NULL; else h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - + /* Some relocs require a global offset table. */ if (dynobj == NULL) { @@ -2596,7 +2596,7 @@ sh_elf64_check_relocs (abfd, info, sec, relocs) if (!_bfd_elf64_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) return false; break; - + /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_SH_GNU_VTENTRY: @@ -2881,7 +2881,7 @@ sh_elf64_check_relocs (abfd, info, sec, relocs) break; } } - + return true; } |