On 11/28/22 06:59, Joakim Nohlgård wrote:
The check for HAVE_LD_RO_RW_SECTION_MIXING fails on targets where ld
does not support shared objects, even though the answer to the test
should be 'read-write'. One such target is riscv64-unknown-elf. Failing
this test results in a libgcc crtbegin.o which has a writable .eh_frame
section leading to the default linker scripts placing the .eh_frame
section in a writable memory segment, or a linker warning about writable
sections in a read-only segment when using ld scripts that place
.eh_frame unconditionally in ROM.

gcc/ChangeLog:

        * configure: Regenerate.
        * configure.ac: Use ld -r in the check for HAVE_LD_RO_RW_SECTION_MIXING

I'm not sure that simply replacing -shared with -r is the right fix here.  ISTM that if the -shared tests fails, then we can/should try the -r variant.    Am I missing something here?


jeff


Reply via email to