[PATCH v2] elf: Set text-segment address to the maximum page size
Jan Beulich
jbeulich@suse.com
Fri Jun 19 13:01:41 GMT 2026
On 28.05.2026 09:16, H.J. Lu wrote:
> On Thu, May 28, 2026 at 11:08 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>> When generating Position Dependent Executable for ELF with the maximum
>> page size set on command-line, if text-segment address is lower than the
>> maximum page size, set text-segment address to the maximum page size.
>>
>> PR ld/34184
>> * ldexp.c (fold_binary): Set text-segment address to the maximum
>> page size for ELF PDE output with -z max-page-size=SIZE.
>> * testsuite/ld-elf/elf.exp: Add ld/34184 test.
>> * testsuite/ld-elf/pr34184.c: New file.
>
> Here is the v2 patch to add tests for PIE, static PDE and static PIE.
Why is this special to text-segment? Doesn't something like this need
doing either for all segments, or for whatever is the first segment?
Jan
More information about the Binutils
mailing list