aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-05-28 15:54:15 +0930
committerAlan Modra <amodra@gmail.com>2019-05-28 15:56:14 +0930
commit94667ab146a0c94f87f3d9aa7d1c819663b28338 (patch)
treeb4c8de3204f8231fa6dd1b58910639da86099a74 /bfd
parent28fbeab8064f97ca5fe1a851fdc4146b7aed8863 (diff)
downloadgdb-94667ab146a0c94f87f3d9aa7d1c819663b28338.zip
gdb-94667ab146a0c94f87f3d9aa7d1c819663b28338.tar.gz
gdb-94667ab146a0c94f87f3d9aa7d1c819663b28338.tar.bz2
Microblaze linker segmentation fault
PR 24596 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't attempt to set sh_entsize for excluded PLT section.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-microblaze.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1d8b75d..464203f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,6 +1,12 @@
2019-05-28 Alan Modra <amodra@gmail.com>
PR 24596
+ * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
+ attempt to set sh_entsize for excluded PLT section.
+
+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.
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index 8015465..8d1700b 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -3455,9 +3455,10 @@ microblaze_elf_finish_dynamic_sections (bfd *output_bfd,
memset (splt->contents, 0, PLT_ENTRY_SIZE);
bfd_put_32 (output_bfd, (bfd_vma) 0x80000000 /* nop. */,
splt->contents + splt->size - 4);
- }
- elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+ if (splt->output_section != bfd_abs_section_ptr)
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+ }
}
/* Set the first entry in the global offset table to the address of