PR24704, Internal error building skiboot for powerpc64-linux-gnu
authorAlan Modra <amodra@gmail.com>
Sun, 23 Jun 2019 02:58:39 +0000 (12:28 +0930)
committerAlan Modra <amodra@gmail.com>
Sun, 23 Jun 2019 13:41:27 +0000 (23:11 +0930)
commitbb22a41815facfaa3de621aad5d055eb8e477082
treebd54a134f929ced282316e5a215330117f4bb728
parent14b2a8e4244a29208ad430167860a0f01b20f215
PR24704, Internal error building skiboot for powerpc64-linux-gnu

While the skiboot linker script bears some culpability in this PR,
it's also true that the GOT indirect to GOT relative optimisation for
16-bit offsets isn't safe.  At least, it isn't safe to remove the GOT
entry based on distance between the GOT pointer and symbol calculated
from the preliminary layout.  So this patch removes that optimisation,
and reduces the range allowed for 32-bit and 34-bit offsets.

PR 24704
bfd/
* elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
(ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
Reduce range of offsets allowed for other GOT relocs.
ld/
* testsuite/ld-powerpc/elfv2exe.d: Update.
* testsuite/ld-powerpc/elfv2so.d: Update.
bfd/ChangeLog
bfd/elf64-ppc.c
ld/ChangeLog
ld/testsuite/ld-powerpc/elfv2exe.d
ld/testsuite/ld-powerpc/elfv2so.d