[LLVMdev] LLD input graph handling proposal
Shankar Easwaran
shankare at codeaurora.org
Sat Sep 21 06:34:23 PDT 2013
Hi Joerg,
I would love to have this behavior(solaris/hp-ux linkers used to do this).
cat > main.c << \!
int main() {
fn();
fn1();
}
!
cat > fn.c << \!
int fn() {
return 0;
}
!
cat > fn1.c << \!
int fn1() {
return 0;
}
!
gcc -c -fPIC main.c fn.c fn1.c
ld -shared fn1.o -o libfn1.so
ld -shared fn.o -o libfn.so -L. -lfn1
ld main.o libfn.so
ld: warning: libfn1.so, needed by libfn.so, not found (try using -rpath
or -rpath-link)
ld: warning: cannot find entry symbol _start; defaulting to 00000000004002f0
main.o: In function `main':
main.c:(.text+0x14): undefined reference to `fn1'
Any ways of making the GNU linker do a DFS/BFS search on dependent
libraries ?
Thanks
Shankar Easwaran
On 9/21/2013 5:25 AM, Joerg Sonnenberger wrote:
> On Fri, Sep 20, 2013 at 05:29:32PM -0700, Rui Ueyama wrote:
>> I don't also understand if DT_NEEDED is related to this. DT_NEEDED is not
>> represented by input graph. And what is *recursive* processing of DT_NEEDED?
> Searching a symbol in a shared library according to ELF semantics means
> recursively searching in all depending libraries as well.
>
> Joerg
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
More information about the llvm-dev
mailing list