[PATCH v2] ld: Rewrite lang_size_relro_segment_1
H.J. Lu
hjl.tools@gmail.com
Tue Jan 18 04:16:26 GMT 2022
On Sun, Jan 16, 2022 at 8:08 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Fri, Jan 14, 2022 at 01:55:27PM -0800, H.J. Lu wrote:
> > Now I have time to rewrite lang_size_relro_segment_1. Is it OK for
> > master?
>
> No, I don't believe you can calculate the adjustment for the first
> relro section without paintakingly working backwards from the last
> section taking into account each section's alignment. See commit
> 0e5fabeb2c4b and b39910205f54.
>
Here is the v2 patch to track the maximum section alignment from
the RELRO segment. If the maximum page size >= the maximum
section alignment, we can align the RELRO segment to the maximum
page size.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-ld-Rewrite-lang_size_relro_segment_1.patch
Type: text/x-patch
Size: 11043 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20220117/6ac6c74c/attachment.bin>
More information about the Binutils
mailing list