Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 30 Jan 2020 00:20:28 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: Static linking is broken after creation of DT_TEXTREL
 segment

* Андрей Аладьев <aladjev.andrew@...il.com> [2020-01-30 00:35:52 +0300]:
> "readelf -d main | grep TEXTREL" returns the same text on both musl and
> glibc containers:
> 
> 0x0000000000000016 (TEXTREL) 0x0
> 0x000000000000001e (FLAGS)     TEXTREL

ok so the glibc executable is broken too, you just didn't
notice because it's silently wasting resources and will
only fail with pax or selinux hardened setups.

> > i'm also surprised that it was only a warning, i think gcc default pie
> toolchain passes -z text nowadays exactly to make this a link time failure.
> this is probably a gentoo toolchain bug.
> 
> What do you mean "-z text"? We can report improvement for gentoo.

it's an ld flag that makes textrels an error, a toolchain
that defaults to pie should pass it to the linker because
otherwise it's easy to get textrels unintentionally.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.