aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sparc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-04-14 09:50:07 +0000
committerAlan Modra <amodra@gmail.com>2004-04-14 09:50:07 +0000
commit6de00a78235f512af73af5ea4b4f0e60e8b45ca0 (patch)
treefae6bd4468fa3551f2c37d053aee5aa64ef4a49e /bfd/elf32-sparc.c
parentd766e8ec5050cef93be39b7b7fbd3142a7a587cd (diff)
downloadgdb-6de00a78235f512af73af5ea4b4f0e60e8b45ca0.zip
gdb-6de00a78235f512af73af5ea4b4f0e60e8b45ca0.tar.gz
gdb-6de00a78235f512af73af5ea4b4f0e60e8b45ca0.tar.bz2
* elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
when statically linking PIC code. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf32-sparc.c')
-rw-r--r--bfd/elf32-sparc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 3016652..0f94f5f 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -2323,7 +2323,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
if (h == NULL)
break;
- if (h->plt.offset == (bfd_vma) -1)
+ if (h->plt.offset == (bfd_vma) -1 || htab->splt == NULL)
{
/* We didn't make a PLT entry for this symbol. This
happens when statically linking PIC code, or when
@@ -2331,9 +2331,6 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
- if (htab->splt == NULL)
- abort ();
-
relocation = (htab->splt->output_section->vma
+ htab->splt->output_offset
+ h->plt.offset);