COMMITTED: Add support for STT_IFUNC
Ian Lance Taylor
iant@google.com
Fri Dec 5 15:04:00 GMT 2008
Tristan Gingold <gingold@adacore.com> writes:
> On Dec 5, 2008, at 6:19 AM, Ian Lance Taylor wrote:
>
>> Tristan Gingold <gingold@adacore.com> writes:
>>
>>> I haven't look at the implementation, but is a STT_IFUNC allowed to
>>> have relocations
>>> against STT_IFUNC symbols ?
>>>
>>> If not, this is must be checked at link time, otherwise the entries
>>> must be topologically ordered.
>>
>> I don't see why a topological ordering is required. It suffices to
>> resolve the relocations lazily on demand. Of course, a circular
>> reference will cause an error or an infinite loop.
>
> Humm, right. But better to detect this at link time rather than
> unexpectedly at run time.
I suppose, but it's easy to construct a case using conditionals which
appears to be circular based on relocation information but actually
works in practice. So it would be hard to detect--you would have to
do a walk through relocations and sections--and it could only ever be
a warning.
Ian
More information about the Binutils
mailing list