This is the mail archive of the 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]

[Bug dynamic-link/20673] ifunc resolver function cannot call extern functions

--- Comment #2 from Szabolcs Nagy <nszabolcs at gmail dot com> ---
(In reply to Florian Weimer from comment #1)
> Calling extern functions is possible if no run-time relocation is required,
> or if the shared object properly expresses its dependencies using DT_NEEDED
> (and there are no cycles).  Your example has a cycle.

this is not related to DT_NEEDED or cycles in module dependencies.

change cond() to rand() to get a test with proper module
dependencies and extern call into libc.

it does not help that is loaded before
the pltgot entries of are not yet initialized,
when the ifunc resolver of foo calls rand@plt so it
jumps to 0 instead of calling the lazy resolver/rand.

this is not just a documentation bug: users cannot
tell what relocations might appear in a c language
function or if those may be processed later than the
resolver is called.

You are receiving this mail because:
You are on the CC list for the bug.

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