diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2022-12-27 11:41:11 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-12-27 11:46:30 -0800 |
commit | 9eb71a53bf36a370e21a6fbbb21e2726f64b0fd0 (patch) | |
tree | b1ca16b9c1eb2b3c7a3ef2b355cf76297e6ba3fa /ld | |
parent | 767e2daed4da3245350d1e45e4eee42964d656f6 (diff) | |
download | binutils-9eb71a53bf36a370e21a6fbbb21e2726f64b0fd0.zip binutils-9eb71a53bf36a370e21a6fbbb21e2726f64b0fd0.tar.gz binutils-9eb71a53bf36a370e21a6fbbb21e2726f64b0fd0.tar.bz2 |
x86-64: Allocate input section memory if needed
When --no-keep-memory is used, the input section memory may not be cached.
Allocate input section memory for -z pack-relative-relocs if needed.
bfd/
PR ld/29939
* elfxx-x86.c (elf_x86_size_or_finish_relative_reloc): Allocate
input section memory if needed.
ld/
PR ld/29939
* testsuite/ld-elf/dt-relr-2i.d: New test.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ld-elf/dt-relr-2i.d | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/dt-relr-2i.d b/ld/testsuite/ld-elf/dt-relr-2i.d new file mode 100644 index 0000000..ed0ef9c --- /dev/null +++ b/ld/testsuite/ld-elf/dt-relr-2i.d @@ -0,0 +1,17 @@ +#source: dt-relr-2.s +#ld: -e _start -pie --no-keep-memory $DT_RELR_LDFLAGS +#readelf: -rW -d +#target: [supports_dt_relr] + +#... + 0x[0-9a-f]+ \(RELR\) +0x[0-9a-f]+ + 0x[0-9a-f]+ \(RELRSZ\) +(8|16) \(bytes\) + 0x[0-9a-f]+ \(RELRENT\) +(4|8) \(bytes\) +#... +Relocation section '\.rel(a|)\.dyn' at offset 0x[0-9a-f]+ contains 1 entry: +#... +[0-9a-f]+ +[0-9a-f]+ +R_.*_(RELATIVE|UADDR.*) .* +#... +Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries: + 4 offsets +#pass |