[Bug dynamic-link/20673] ifunc resolver function cannot call extern functions
nszabolcs at gmail dot com
sourceware-bugzilla@sourceware.org
Mon Oct 10 14:23:00 GMT 2016
https://sourceware.org/bugzilla/show_bug.cgi?id=20673
--- 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 libc.so is loaded before foo.so:
the pltgot entries of foo.so 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.
More information about the Glibc-bugs
mailing list