* elf.c (_bfd_elf_rela_local_sym): Only call
_bfd_merged_section_offset if merge_info is non-NULL. (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New. * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New prototypes. * elf32-arm.h (elf32_arm_final_link_relocate): Use _bfd_elf_section_offset. (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym. * elf32-i386.c (elf_i386_relocate_section): Use _bfd_elf_section_offset and _bfd_elf_rel_local_sym. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Use _bfd_elf_section_offset. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
This commit is contained in:
parent
edb6ede1be
commit
c629eae01a
20 changed files with 157 additions and 285 deletions
|
@ -6358,29 +6358,10 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
|
|||
< sreloc->_raw_size);
|
||||
|
||||
skip = false;
|
||||
|
||||
/* We begin by assuming that the offset for the dynamic relocation
|
||||
is the same as for the original relocation. We'll adjust this
|
||||
later to reflect the correct output offsets. */
|
||||
if (elf_section_data (input_section)->stab_info == NULL)
|
||||
outrel.r_offset = rel->r_offset;
|
||||
else
|
||||
{
|
||||
/* Except that in a stab section things are more complex.
|
||||
Because we compress stab information, the offset given in the
|
||||
relocation may not be the one we want; we must let the stabs
|
||||
machinery tell us the offset. */
|
||||
outrel.r_offset
|
||||
= (_bfd_stab_section_offset
|
||||
(output_bfd, &elf_hash_table (info)->stab_info,
|
||||
input_section,
|
||||
&elf_section_data (input_section)->stab_info,
|
||||
rel->r_offset));
|
||||
/* If we didn't need the relocation at all, this value will be
|
||||
-1. */
|
||||
if (outrel.r_offset == (bfd_vma) -1)
|
||||
skip = true;
|
||||
}
|
||||
outrel.r_offset =
|
||||
_bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset);
|
||||
if (outrel.r_offset == (bfd_vma) -1)
|
||||
skip = true;
|
||||
|
||||
/* If we've decided to skip this relocation, just output an empty
|
||||
record. Note that R_MIPS_NONE == 0, so that this call to memset
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue