diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2017-07-18 17:20:30 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2017-07-18 17:20:30 +0100 |
commit | 927960f053ec6e361236964c3780d2acd5de4084 (patch) | |
tree | 46fc2d41c057710944c7002b9351400a85d053b5 /bfd | |
parent | 9a0f1d5099fa375299115afaa1ef3acbddc47f51 (diff) | |
download | gdb-927960f053ec6e361236964c3780d2acd5de4084.zip gdb-927960f053ec6e361236964c3780d2acd5de4084.tar.gz gdb-927960f053ec6e361236964c3780d2acd5de4084.tar.bz2 |
LD/testsuite: Conditionalize the placement of `.got' in GNU_RELRO
Complement commit d345186d0535 ("Check if GNU_RELRO segment is is
generated") and exclude the presence of a `.got' section from implying
the creation of a GNU_RELRO segment for targets which place the section
along with small data, and therefore as it stands cannot have the
section assigned to GNU_RELRO. This is because we currently only
support a single GNU_RELRO segment and we place it at the beginning of
regular data which is then separated from small data by read-write data.
Currently the list of such targets consists of Alpha, Linux HPPA, NetBSD
HPPA, OpenBSD HPPA, Meta, MIPS, Nios II, OpenRISC 1000, RISC-V, SH and
X86-64, as determined by examining default linker scripts produced in a
`--enable-targets=all' build for those that have DATA_SEGMENT_RELRO_END
set and `.got' placed beyond. These targets do not set NO_SMALL_DATA or
DATA_GOT in their respective files in ld/emulparams/*, hovever checking
for the absence of these settings on its own is not very feasible due to
the structure of these files and the lack of support for GNU_RELRO by
some targets in the first place.
Add a separate control for `.got.plt' which does get placed in GNU_RELRO
on MIPS targets even though `.got' does not.
ld/
* testsuite/ld-elf/binutils.exp (binutils_test): Make the
expectation for `.got' in GNU_RELRO segment target-specific.
Handle `.got.plt' separately.
Diffstat (limited to 'bfd')
0 files changed, 0 insertions, 0 deletions