[nios2, committed] Disable --eh-frame-hdr with -pie or -shared on nios2-linux-gnu
Sandra Loosemore
sandra@codesourcery.com
Sun Dec 8 17:30:00 GMT 2019
On 12/5/19 2:47 PM, Sandra Loosemore wrote:
> I've checked in this patch to fix a long-standing bug on nios2-linux-gnu
> that resulted in linker errors like
>
> ../nios2-linux-gnu/bin/ld: FDE encoding in /tmp/cccfpQ2l.o(.eh_frame)
> prevents .eh_frame_hdr table being created
>
> when linking with -pie or -shared. The nios2 ABI doesn't provide the
> relocations needed for those situations, so we shouldn't be passing
> --eh-frame-hdr to the linker.
>
> I've also checked in a related patch to the linker:Â it was emitting
> these diagnostics unconditionally, even when --eh-frame-hdr was not
> enabled. See
>
> https://sourceware.org/ml/binutils/2019-12/msg00013.html
>
> -Sandra
I've reverted this patch, as it appears I accidentally tested a
different version of it (that disabled the option for -pie only and not
-shared) than I committed, and the one committed triggers other errors.
I need to revisit my original analysis of the linker bug and figure out
why it is being triggered for -shared too. And there's probably another
bug lurking somewhere that's causing the execution errors in shared
libraries linked without --eh-frame-hdr. Needs More Thought.
BTW, the test case for -shared is the C++ version of the program used to
test for { dg-require-effective-target shared } support. :-( (But
libstdc++ builds fine as a shared library and doesn't fall over during
testing....)
-Sandra
More information about the Gcc-patches
mailing list