aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i370.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-02-19 12:40:32 +0000
committerJakub Jelinek <jakub@redhat.com>2002-02-19 12:40:32 +0000
commit0bb2d96afee35ad4b023efc2df2791c56f68cfe6 (patch)
treef38ada957252f08b081df2086a0a14bac9ce4845 /bfd/elf32-i370.c
parent41d39a95af476969be023d4b7e129042c8daf5c8 (diff)
downloadgdb-0bb2d96afee35ad4b023efc2df2791c56f68cfe6.zip
gdb-0bb2d96afee35ad4b023efc2df2791c56f68cfe6.tar.gz
gdb-0bb2d96afee35ad4b023efc2df2791c56f68cfe6.tar.bz2
* 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/elf32-i370.c')
-rw-r--r--bfd/elf32-i370.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index 5ac43dd..aa9cd39 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -1436,7 +1436,7 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
&& r_symndx != 0)
{
Elf_Internal_Rela outrel;
- boolean skip;
+ int skip;
#ifdef DEBUG
fprintf (stderr,
@@ -1468,13 +1468,14 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (sreloc != NULL);
}
- skip = false;
+ skip = 0;
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 (outrel.r_offset == (bfd_vma) -1
+ || outrel.r_offset == (bfd_vma) -2)
+ skip = (int) outrel.r_offset;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@@ -1549,7 +1550,7 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* This reloc will be computed at runtime, so there's no
need to do anything now, unless this is a RELATIVE
reloc in an unallocated section. */
- if (skip
+ if (skip == -1
|| (input_section->flags & SEC_ALLOC) != 0
|| ELF32_R_TYPE (outrel.r_info) != R_I370_RELATIVE)
continue;