diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-02-19 12:40:32 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2002-02-19 12:40:32 +0000 |
commit | 5cf202beda248b469c5ff1ebf9d97c74b07c695d (patch) | |
tree | 26c5272cfde75eb109cbfc0c2b1733c3475d07f5 /bfd/elf64-x86-64.c | |
parent | d080dbaf725b079156daca4cb1299c23698c85bd (diff) | |
download | gdb-5cf202beda248b469c5ff1ebf9d97c74b07c695d.tar.gz |
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
absptr -> pcrel optimization for shared libs.
Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
library cannot be converted to pcrel.
(_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
relative.
* elf32-i386.c (elf_i386_relocate_section): If
_bfd_elf_section_offset returned -2, skip, but make sure the
relocation is installed.
* elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
* 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-ppc.c (ppc_elf_relocate_section): Likewise.
* elf32-s390.c (elf_s390_relocate_section): Likewise.
* elf32-sh.c (sh_elf_relocate_section): Likewise.
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
* elf64-s390.c (elf_s390_relocate_section): Likewise.
* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
* elf64-alpha.c (elf64_alpha_relocate_section): Handle
_bfd_elf_section_offset returning -2 the same way as -1.
* elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
* elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
and BFD_ASSERT.
* elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r-- | bfd/elf64-x86-64.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 4bbbb0871ea..cdd36d1623f 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -1466,21 +1466,21 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section, } skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rela->r_offset); if (outrel.r_offset == (bfd_vma) -1) skip = true; + else if (outrel.r_offset == (bfd_vma) -1) + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); if (skip) - { - memset (&outrel, 0, sizeof outrel); - relocate = false; - } + memset (&outrel, 0, sizeof outrel); /* h->dynindx may be -1 if this symbol was marked to become local. */ else if (h != NULL @@ -1489,7 +1489,6 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section, & ELF_LINK_HASH_DEF_REGULAR) == 0)) { BFD_ASSERT (h->dynindx != -1); - relocate = false; outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); outrel.r_addend = relocation + rela->r_addend; } @@ -1530,7 +1529,6 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section, BFD_ASSERT (sindx > 0); } - relocate = false; outrel.r_info = ELF64_R_INFO (sindx, r_type); outrel.r_addend = relocation + rela->r_addend; } |