diff options
author | Alan Modra <amodra@gmail.com> | 2019-08-16 13:20:28 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-08-16 13:38:11 +0930 |
commit | 7df6aecc97b96843da080d54414052b1c954ddca (patch) | |
tree | bb2ad6a0496da49fe2613d52615b31ca59256885 /ld/emultempl | |
parent | 63f6e94fb3cc5b6a2cfb8c28686f150e7226ab7e (diff) | |
download | gdb-7df6aecc97b96843da080d54414052b1c954ddca.zip gdb-7df6aecc97b96843da080d54414052b1c954ddca.tar.gz gdb-7df6aecc97b96843da080d54414052b1c954ddca.tar.bz2 |
PowerPC gcc bootstrap fail with bss-plt
git commit 3e04d7655b introduced a bug by sizing output sections
earlier in ppc_before_allocation. That meant PLT (and GOT) sizes were
not included when calculating total executable section sizes.
* emultempl/ppc32elf.em (ppc_before_allocation): Force running
prelim_size_sections before deciding whether branch trampolines
might be needed.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/ppc32elf.em | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ld/emultempl/ppc32elf.em b/ld/emultempl/ppc32elf.em index 5387ef1..24a6368 100644 --- a/ld/emultempl/ppc32elf.em +++ b/ld/emultempl/ppc32elf.em @@ -171,7 +171,12 @@ ppc_before_allocation (void) bfd_vma high = 0; asection *o; - /* Run lang_size_sections (if not already done). */ + /* Run lang_size_sections even if already done, so as to pick + up gld${EMULATION_NAME}_before_allocation sizing. This + matters when we have an executable bss plt which will + typically be laid out near the end of the image, ie. worst + case for branches at the start of .text. */ + expld.phase = lang_first_phase_enum; prelim_size_sections (); for (o = link_info.output_bfd->sections; o != NULL; o = o->next) |