diff options
author | Alan Modra <amodra@gmail.com> | 2014-01-10 21:11:46 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-01-10 21:49:56 +1030 |
commit | eec2f3ed9f053653ed5d629eb50e08e3ee61e9bd (patch) | |
tree | 2a12dda58d04db24d58892f45db6eab16240bb00 /ld/ld.texinfo | |
parent | a2cd8cfed14491303eb8338f90e206034c5a3fe2 (diff) | |
download | gdb-eec2f3ed9f053653ed5d629eb50e08e3ee61e9bd.zip gdb-eec2f3ed9f053653ed5d629eb50e08e3ee61e9bd.tar.gz gdb-eec2f3ed9f053653ed5d629eb50e08e3ee61e9bd.tar.bz2 |
Don't adjust LOAD segment to match GNU_RELRO segment
Instead, fix Jakub's original code setting up the PR_GNU_RELRO header
from the PT_LOAD header.
PR ld/14207
PR ld/16322
PR binutils/16323
bfd/
* elf.c (assign_file_positions_for_load_sections): Revert last change.
(assign_file_positions_for_non_load_sections): When setting up
PT_GNU_RELRO header, don't require a corresponding PT_LOAD
header that completely covers the relro region.
ld/
* ldlang.c (lang_size_sections): Remove unneeded RELRO base
adjust. Tidy comments.
* ld.texinfo (DATA_SEGMENT_RELRO_END): Correct description.
ld/testsuite/
* ld-x86-64/pr14207.d: Adjust
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r-- | ld/ld.texinfo | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo index 398dd594..ae3d568 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -5916,13 +5916,15 @@ evaluation purposes. @item DATA_SEGMENT_RELRO_END(@var{offset}, @var{exp}) @kindex DATA_SEGMENT_RELRO_END(@var{offset}, @var{exp}) This defines the end of the @code{PT_GNU_RELRO} segment when -@samp{-z relro} option is used. Second argument is returned. +@samp{-z relro} option is used. When @samp{-z relro} option is not present, @code{DATA_SEGMENT_RELRO_END} does nothing, otherwise @code{DATA_SEGMENT_ALIGN} is padded so that @var{exp} + @var{offset} is aligned to the most commonly used page boundary for particular target. If present in the linker script, it must always come in between @code{DATA_SEGMENT_ALIGN} and -@code{DATA_SEGMENT_END}. +@code{DATA_SEGMENT_END}. Evaluates to the second argument plus any +padding needed at the end of the @code{PT_GNU_RELRO} segment due to +section alignment. @smallexample . = DATA_SEGMENT_RELRO_END(24, .); |