Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 May 2020 19:47:26 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r361657 - head/sys/sys
Message-ID:  <CAPyFy2DjC---SVNXnkQOmbuTOxyq9pucmBXS7vg1mEfJp0%2BfWA@mail.gmail.com>
In-Reply-To: <20200530233928.GM48478@kib.kiev.ua>
References:  <202005301957.04UJvRkb020021@repo.freebsd.org> <20200530201405.GL48478@kib.kiev.ua> <CAPyFy2A8=-%2BQ3kgDbh5sjq1P32gRCmgJQbMwqNoC=0cxwgf2RQ@mail.gmail.com> <CAPyFy2D8%2BUXpS4pxbC26QN62dwTRL3tmpzmb8n2hQk3P1U7f0w@mail.gmail.com> <20200530233928.GM48478@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 30 May 2020 at 19:39, Konstantin Belousov <kostikbel@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2DjC---SVNXnkQOmbuTOxyq9pucmBXS7vg1mEfJp0%2BfWA>