Commit: Adjust linker tests for --rosegment

Fangrui Song i@maskray.me
Sat Jul 6 04:06:31 GMT 2024


On Thu, Jun 13, 2024 at 8:59 AM Nick Clifton <nickc@redhat.com> wrote:
>
> Hi Guys,
>
>   *sigh* It is always the way.  You check in a patch and then you
>   realise that you had forgotten something.  In this case I checked in
>   the --rosegment patch and then realised that I had not checked the
>   all of the linker tests still passed for a toolchain configured with
>   --enable-separate-code=yes --enable-rosegment=yes.  Sure enough when
>   I did I found some linker tests that do not expect the segment layout
>   with --rosegment.
>
>   So I am checking in the attached patch to fix those tests.
>
> Cheers
>   Nick

Hi Nick,

Thanks for making adjustments. My view point (and also Jakub's I
think) remains that .rodata/.eh_frame/.eh_frame_hdr should be moved
before .text so that there is one single read-only PT_LOAD segment to
minimize the size penalty due to -z separate-code and a large
max-page-size.

 https://sourceware.org/pipermail/binutils/2024-June/134546.html

While I don't know what ports don't like .rodata/.eh_frame before
.text, given that lld has been using the one read-only PT_LOAD segment
for such a long time and
i386/x86-64/arm/aarch64/mips/ppc32/ppc64/riscv/s390x all work, I
believe all the popular architectures are happy with .rodata/.eh_frame
before .text .


More information about the Binutils mailing list