[LLVMdev] LLD input graph handling proposal

Rui Ueyama ruiu at google.com
Mon Sep 23 10:33:22 PDT 2013


I just want to mention that although I assume we'll use this abstraction
for some features that we have already support, I'd really like to see the
first patch to be minimal that just implements the nextFile() which is
connected to the existing infrastructure. We can then replace code step by
step. Incremental patches are always preferred.

On Sat, Sep 21, 2013 at 6:34 AM, Shankar Easwaran
<shankare at codeaurora.org>wrote:

> 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<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
>>
>>
>>
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by the Linux Foundation
>
> ______________________________**_________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130923/ae6d2411/attachment.html>


More information about the llvm-dev mailing list