This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [Question] ifunc odering in ELF
- From: Juchan Kim <juckim at blackberry dot com>
- To: "fweimer at redhat dot com" <fweimer at redhat dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Tue, 17 Sep 2019 13:19:24 +0000
- Subject: Re: [Question] ifunc odering in ELF
- References: <1568314984.28076.65.camel@blackberry.com> <87pnjzy75u.fsf@oldenburg2.str.redhat.com>
- Reply-to: Juchan Kim <juckim at blackberry dot com>
Hi Florian,
OK. That's what I also expected.
Thanks for the reply.
Cheers,
Juchan
On Mon, 2019-09-16 at 22:43 -0400, Florian Weimer wrote:
> * Juchan Kim:
>
> >
> > We have two ifuncs foo1 and foo2 in our library
> >
> > foo1 has foo1_resolver()
> > foo2 has foo2_resolver()
> >
> >
> > foo1_resolver() {
> > ...
> > }
> >
> > foo2_resolver() {
> > foo1()
> > ...
> > }
> IFUNC resolvers must not depend on run-time relocations. If you
> follow
> that rule, this cannot happen.
>
> binutils ld sorts IFUNC relocations last, which helps, but to cover
> more
> cases (but not all of them), run-time reordering of relocations is
> needed. We have some patches for that, but my impression is that the
> glibc project does not want them. Instead, we're probably going to
> remove all IFUNC resolvers with relocation dependencies from glibc,
> and
> tell others to do so as well.
>
> Thanks,
> Florian