[PATCH v7 2/4] elf: Do not change stack permission on dlopen/dlmopen
Florian Weimer
fw@deneb.enyo.de
Mon Jan 6 13:27:16 GMT 2025
* Stafford Horne:
> On Mon, Jan 06, 2025 at 12:15:49PM +0100, Florian Weimer wrote:
>> * Stafford Horne:
>>
>> > I will look to fixing this by seeing if I can get GCC to not need to
>> > have an executable stack for libgcc_s.so.1. But it will mean
>> > running new glibc with old gcc installs may have some issues.
>> >
>> > If you have any suggestions let me know.
>>
>> I think the first step is to figure out if libgcc_s.so.1 actually
>> needs an executable stack, or if the markup is incorrect.
>
> Yes, thanks, I already figured it out and replied. I sent the original mail
> just in case it was something that may have been overlooked with dloepn patch.
>
> It seems no issue, when building GCC I noticed:
>
> ld: warning: __modsi3_s.o: missing .note.GNU-stack section implies executable stack
> ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
>
> This is caused by a file containing a bunch of math builtin's that don't even
> use the stack. So I added the correct .note and the libgcc_s.so.1 no longer
> requires the executable stack.
We can mention this in NEWS and not do anything else (except maybe GCC
backports to active release branches). Maybe that's sufficient given
the current nature of the or1k port?
An alternative would be to patch the dynamic linker to ignore the
markup on libgcc_s.so.1, but maybe that's not necessary.
More information about the Libc-alpha
mailing list