[PATCH v8 3/6] elf: Introduce _dl_map_segment_align hook for segment alignment tuning
H.J. Lu
hjl.tools@gmail.com
Thu Apr 9 21:11:22 GMT 2026
On Fri, Apr 10, 2026 at 5:06 AM Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
>
> Hi HJ,
>
> > Unless the first R segment is bigger than 2MB, we need to align from the
> > file offset 0 anyway. That is what my proposal does.
>
> But it doesn't, that's my issue. It would be perfectly fine to generalize Rui's patch
What did you mean by "doesn't"?
> to remove the condition that the R+X segment must start at zero offset and check
The easiest way to implement it is to combine R + RX segments in one segment
from the file offset 0. We only need 1 load, instead of 2.
> any segment before it is contiguous and R.
>
> Merging R with R+W should be done in the linker.
>
> Cheers,
> Wilco
--
H.J.
More information about the Libc-alpha
mailing list