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


-----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.

- --
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkodd/sACgkQ2ijCOnn/RHQXiQCePW4Wf0gVofc/9++SwpS1d3vZ
w0oAnieTzz2TyHidIWQW6QLqAHNjh7dj
=hyef
-----END PGP SIGNATURE-----


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