This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: Proposal for STT_GNU_IFUNC and R_*_IRELATIVE


On Wed, May 27, 2009 at 10:27 AM, Ulrich Drepper <drepper@redhat.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> H.J. Lu wrote:
>> After looking another look, DT_* may be a good idea. STT_GNU_IFUNC
>> can be in DSO, dynamic executable and static executable. We need a way
>> to make it to work for all 3 cases.
>
> And? ?Relocations of course also work in all the cases.
>
> It is a braindead idea to invent a new data structure every time some
> gets added. ?Especially if there is already one which perfectly fits the
> bill. ?There is no reason whatsoever to not use a relocation. ?The
> introduction of a DT_* described data structure just makes things more
> complicated at runtime.
>
> The argument that only one thing for all architectures has to be changed
> is irrelevant. ?The amount of work needed in the linker in negligible.
> On the other hand, there have to be completely different implementations
> for the fancy new data structure for different architectures if the
> function pointer implementation differs.
>
>
> Using R_*_IRELATIVE relocations is the right way to handle this.
>

How to do you handle R_*_PC32 relocation to a locally defined
STT_GNU_IFUNC symbol in dynamic and static executables?


-- 
H.J.


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