This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC 2/2] Update prototype of IFUNC resolver for MIPS
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- Cc: Faraz Shahbazker <faraz dot shahbazker at imgtec dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Matthew Fortune <Matthew dot Fortune at imgtec dot com>, Robert Suchanek <Robert dot Suchanek at imgtec dot com>
- Date: Sat, 5 Sep 2015 07:32:11 +0200
- Subject: Re: [RFC 2/2] Update prototype of IFUNC resolver for MIPS
- Authentication-results: sourceware.org; auth=none
- References: <55CE5217 dot 5020902 at imgtec dot com> <87io8f2gc9 dot fsf at googlemail dot com> <55D23368 dot 1070705 at imgtec dot com> <87io8dhegb dot fsf at googlemail dot com> <55D269D2 dot 2030208 at imgtec dot com> <87si7h6oyv dot fsf at googlemail dot com> <55D7A3C5 dot 8050600 at imgtec dot com> <87vbc7u1df dot fsf at googlemail dot com> <55E8C3C5 dot 8000107 at imgtec dot com> <55E99A04 dot 4050809 at arm dot com>
On Fri, Sep 04, 2015 at 02:17:56PM +0100, Szabolcs Nagy wrote:
> On 03/09/15 23:03, Faraz Shahbazker wrote:
> > +static int __attribute_used__
> > +dl_ifunc_control (int operation, int value)
> > +{
> ...
> > + /* Remember the choice for the last compabitle FP ABI. */
> > + ifunc_fpabi = in_abi;
> ...
also typo here
> >+/* FP ABI requirement for ifunc with callback. The new mode switch can only
> >+ be requested once. */
> >+
> >+static int ifunc_fpabi = -1;
> >+
>
> i think the resolver needs to be as-safe, so modified
> objects should be volatile (sig_atomic_t).
>
We talked about this at cauldron. This is collorary of my question if
resolver is ok. We use recursive lock around that so I asked if its ok
when singal arrives while we hold it. Carlos said that we should check
all architectures if everything stays consistent. So ifunc should also
do same.
There is also question if we should resolve ifuncs early like with
LD_BIND_NOW=1. That we could already do eager binding implies that ifunc
should return same result while application runs.
> the ifunc situation is quite messy, is it supposed to be
> used outside of the libc? (i know on x86, gcc target libs
> and function multi-versioning use it, but i'd assume other
> targets would move away from it outside the libc).
Yes, its public but there isn't clear whats allowed and what isn't.