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

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


https://sourceware.org/bugzilla/show_bug.cgi?id=20673

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Szabolcs Nagy from comment #2)
> (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.

Okay, I used this:

gcc -fPIC -shared -o libfoo.so foo.c && gcc main.c libfoo.so &&
LD_LIBRARY_PATH=. ./a.out

And I can still reproduce it.  This is something we could do better.

(Your original example had a dependency loop, I think.  There is little we can
do about that.)

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