This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove unnecessary IFUNC dispatch for __memset_chk.


On Tue, 11 Aug 2015, H.J. Lu wrote:
> > Didn't know its explicitly forbidden to use nonstatic resolvers. Do we document that requirement somewhere?
> > If not then we should add it to documentation.
> 
> It makes no senses for IFUNC selector to return the address of
> a global function, which may be preempted at run-time.

That would be imposing a policy while providing a mechanism.

I think there are plausible scenarios where returning a global function from
an ifunc resolver would be natural.

To give a specific example, imagine an ifunc symbol
'printf_fortified_opportunistically', which resolves to 'printf_chk' if it is
available in the global namespace, or normal 'printf' otherwise.

Such a symbol could be in any DSO, not necessarily libc, and thus it has to be
able to pick up global symbol definitions.

Thanks.
Alexander


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]