[LLVMdev] [lld] process undefined atoms from shared library only once

Rui Ueyama
2013-11-19T19:49:51Z

I'd do that with the nextFile abstraction like this: On the first
iteration, a Group would return its member every time getNextFile() is
called (the same as the current behavior). On the second and further
iterations, the Group should skip all the members whose type is not
Archive. By doing this, the core linker sees dynamic libraries (or regular
object files) only once even if they are in --{start,end}-group.


On Mon, Nov 18, 2013 at 11:03 PM, Shankar Easwaran
<shankare at codeaurora.org>wrote:

> Hi Nick,
>
> --start-group/--end-group functionality with the Gnu flavor currently
> works only if the --start-group/--end-group contains archive files.
>
> If they contain dynamic libraries, the undefined atoms from the dynamic
> libraries are processed whenever the group is iterated again.
>
> I am trying to find out a way to make the resolver add undefined atoms
> from the shared library only *once*, when the SharedLibrary is first
> visited as part of the Group.
>
> The only approach that I can think of is having a std::map in the resolver
> and using that to process undefined atoms from shared libraries the first
> time the shared library is visited. I dont like this approach as its not
> clean.
>
> Any alternative approaches to handle this ?
>
> Thanks
>
> Shankar Easwaran
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by the Linux Foundation
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20131119/ff8b41de/attachment.html>