[PATCH] Remove unnecessary IFUNC dispatch for __memset_chk.
H.J. Lu
hjl.tools@gmail.com
Mon Aug 17 17:59:00 GMT 2015
On Mon, Aug 17, 2015 at 10:53 AM, Alexander Monakov <amonakov@ispras.ru> wrote:
>> > Earlier you rejected the idea that a resolver can use an externally visible
>> > symbol. I just don't see why you say it might be non-deterministic. One
>> > can inspect the executable, LD_PRELOAD'ed modules, etc. to see whether they
>> > are going to provide an interposing definition of a symbol or not. What is
>> > non-deterministic in there?
>>
>> Due to the way how IFUNC is implemented, dependency on
>> external relocation may lead to undefined behavior. We tried
>> to support external relocations in IFUNC selector:
>>
>> https://sourceware.org/bugzilla/show_bug.cgi?id=13302
>>
>> But external relocation on function address returned by IFUNC
>> selector isn't supported.
>
> Isn't this an implementation deficiency that can be solved, for example, by
> sorting GLOB_DAT relocation appropriately, rather than a fundamental
> restriction that any reasonable implementation of IFUNC would exhibit?
We have no control over GLOB_DAT, which can be a relocation
against IFUNC symbol and we only know for sure at run-time.
--
H.J.
More information about the Libc-alpha
mailing list