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: Proposal for STT_GNU_IFUNC and R_*_IRELATIVE


On Thu, May 28, 2009 at 7:28 AM, Ulrich Drepper <drepper@redhat.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> H.J. Lu wrote:
>> for static executables. It is called from elf-init.c. How can I
>> report a bad relocation safetly?
>
> [I assume you meant dl-init.c.]

No, it is in elf-init.c.. The R_*_IRELATIVE relocations are
processed first in __libc_csu_init before preinit_array only
for static executables.

> And for sake of reducing strange effects: it would be best to to handle
> this a bit different. ?Implicitly relying on the programmer having a
> newer glibc installed which using ifunc can cause problems. ?If,
> instead, you write a new code fragment which is placed into the .init
> section (provided by the linker whenever ifunc symbols are used in
> statically linked code), then this new init function could reference a
> function in libc which doesn't exist in older versions.
>

The same can be said for XXX_array. I don't think you will
get an error if you use preinit_array and your glibc doesn't support
it.


-- 
H.J.


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