Question - intention of UCLIBC_BUILD_NOEXECSTACK?

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Aug 26 19:35:57 UTC 2014


On 25 August 2014 15:57, Andrew McDonnell <bugs at andrewmcdonnell.net> wrote:
> On 25/08/14 22:56, Andrew McDonnell wrote:
>> Hmmm, I am having some trouble repeating my original result.
>>
> <snipped>
>
> OK, with a fresh build, the following appears to apply:
>
> * OpenWRT sets UCLIBC_BUILD_NOEXECSTACK=y
>
> * Somehow this ends up with libcrypt, libm, libresolv, libnsl, libthread_db,
> libdl and  and libutil actually having the NX flag set in the ELF despite
> there being no -Wl,-z,noexecstack linker option specified.
>
> This I really do not understand yet!
>
> * ld-uClibc, librt, libuClibc and libpthread _dont have the NX flag set, which
> is what I would have expected when the link was missing the noexecstack option.
>
> * The above was checked before any stripping applied, just in case
>
> Now its gotten too late, so I'll have to re-test my patch that applies the
> noexecstack marking to ld-uClibc, librt, libuClibc and libpthread as well
> later this week before I submit it.
>
> FWIW this is all done using the OpenWRT buildroot for a carambola2 target
>
> There is another oddity with all of this, as well.
>
> Every single one of libcrypt, libm, libresolv, libnsl, libthread_db, libdl,
> libutil, libuClibc, librt and libpthread are all built with -Wl,-z-relro yet
> the GNU_RELRO section is only present in libdl, libpthread and libuClibc and
> yet all are built with exactly the same set of -Wl,-z options
>
> I am wondering if this is this bug,
> https://sourceware.org/bugzilla/show_bug.cgi?id=16322 because OpenWRT binutils
> is still 2.23

I cannot reproduce this with binutils-gdb 2.24.51.20140818.
Can you try with binutils 2.24 or later please?

TIA,


More information about the uClibc mailing list