svn commit: r361657 - head/sys/sys
Ed Maste
emaste at freebsd.org
Sat May 30 23:47:40 UTC 2020
On Sat, 30 May 2020 at 19:39, Konstantin Belousov <kostikbel at gmail.com> wrote:
>
> > It looks like GNU ld has done it since 2015 in fact. Further, glibc
> > will refuse to dlopen() an object with DF_1_PIE set, as of last June;
> > this seems like it would be a reasonable thing for us to do too.
> >
> > glibc bug for this: https://sourceware.org/bugzilla/show_bug.cgi?id=24323
>
> I can do it. What if such object is referenced by DT_NEEDED ?
Hmm, good question.
glibc has the following comment where they disallow it:
> + /* dlopen of an executable is not valid because it is not possible
> + to perform proper relocations, handle static TLS, or run the
> + ELF constructors. For PIE, the check needs the dynamic
> + section, so there is another check below. */
I would suggest that if it's the case we cannot correctly dlopen or
handle a DT_NEEDED executable then we ought to fail.
More information about the svn-src-head
mailing list