[PATCH v2] elf: Set text-segment address to the maximum page size
H.J. Lu
hjl.tools@gmail.com
Thu May 28 07:16:19 GMT 2026
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.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-elf-Set-text-segment-address-to-the-maximum-page-.patch
Type: application/x-patch
Size: 3395 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20260528/a377bf1f/attachment.bin>
More information about the Binutils
mailing list