diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2022-01-14 13:48:36 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-01-26 05:27:56 -0800 |
commit | c804c6f98d342c3d46f73d7a7ec6229d5ab1c9f3 (patch) | |
tree | d3070e014b3a5057b8c9305121f18ce56a4c9558 /bfd | |
parent | 8357282156771d782be3e3c3d44cc5ad7e1f89d7 (diff) | |
download | gdb-c804c6f98d342c3d46f73d7a7ec6229d5ab1c9f3.zip gdb-c804c6f98d342c3d46f73d7a7ec6229d5ab1c9f3.tar.gz gdb-c804c6f98d342c3d46f73d7a7ec6229d5ab1c9f3.tar.bz2 |
ld: Rewrite lang_size_relro_segment_1
1. Compute the desired PT_GNU_RELRO segment base and find the maximum
section alignment of sections starting from the PT_GNU_RELRO segment.
2. Find the first preceding load section.
3. Don't add the 1-page gap between the first preceding load section and
the relro segment if the maximum page size >= the maximum section
alignment. Align the PT_GNU_RELRO segment first. Subtract the maximum
page size if therer is still a 1-page gap.
PR ld/28743
PR ld/28819
* ldlang.c (lang_size_relro_segment_1): Rewrite.
* testsuite/ld-x86-64/pr28743-1.d: New file.
* testsuite/ld-x86-64/pr28743-1.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run pr28743-1.
Diffstat (limited to 'bfd')
0 files changed, 0 insertions, 0 deletions