Displaying 1 result from an estimated 1 matches for "ex_func".
Did you mean:
ext_func
2012 Mar 20
0
[LLVMdev] Runtime linker issue wtih X11R6 on i386 with -O3 optimization
....o b.o liba.so libb.so app
$ make CFLAGS=-O0
clang -O0 -fpic -c a.c
clang -shared -o liba.so a.o
clang -O0 -fpic -c b.c
clang -shared -o libb.so b.o
clang -O0 -fpic app.c -o app
$ ./app
opening a
opening b
clang and X sitting in a tree :)
The relevant bits of objdump -R
$ objdump -R liba.so | grep ex_func
2000210c R_386_JUMP_SLOT ex_func
Looking at the asm here shows us that ex_func is always looked up in the
PLT.
$ grep ex_func a.s
calll ex_func at PLT
calll ex_func at PLT
========================================================================
With -O3 that doesn't wo...