aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-05-28 15:06:47 +0930
committerAlan Modra <amodra@gmail.com>2019-05-28 15:11:54 +0930
commit28fbeab8064f97ca5fe1a851fdc4146b7aed8863 (patch)
tree644c09485ce3f4a601a76864f12f19378a27e9b0 /bfd
parenta0f6fd217fa53ab80a335fb69f12f1f28ac3335a (diff)
downloadgdb-28fbeab8064f97ca5fe1a851fdc4146b7aed8863.zip
gdb-28fbeab8064f97ca5fe1a851fdc4146b7aed8863.tar.gz
gdb-28fbeab8064f97ca5fe1a851fdc4146b7aed8863.tar.bz2
Alpha-linux linker segmentation fault
This patch cures a linker segfault, and "FAIL: Build pr22263-1". PR 24596 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt to emit R_ALPHA_GOTTPREL in PIEs, for which no space is allocated in alpha_dynamic_entries_for_reloc.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf64-alpha.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index de58a02..1d8b75d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,6 +1,13 @@
2019-05-28 Alan Modra <amodra@gmail.com>
PR 24596
+ * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
+ to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
+ allocated in alpha_dynamic_entries_for_reloc.
+
+2019-05-28 Alan Modra <amodra@gmail.com>
+
+ PR 24596
* elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
on NULL output_section.
* elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 50961d7..6810483 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -4724,7 +4724,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
if (r_type == R_ALPHA_GOTDTPREL)
value -= dtp_base;
- else if (!bfd_link_pic (info))
+ else if (bfd_link_executable (info))
value -= tp_base;
else
{