[lld] r249406 - Handle strong undefined symbols fetching members after a weak undefined.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 11:33:49 PDT 2015
On 6 October 2015 at 14:25, Rui Ueyama <ruiu at google.com> wrote:
> So, we don't want weak undefined symbols to fetch archive members, which
> sounds fine, but I still doesn't get how is this related to --start-group
> and --end-group in regular ELF linkers. I'm just wondering... Could you
> describe a bit?
If --start-group/--end-group didn't exist, traditional ELF linkers
would have to use link lines that looked like
... add_weak_undef.o ... foo.a ... add_strong_undef.o ... foo.a
That is so because they don't fetch members from archives that are
earlier in the command line.
If that wast the case, we would be fine. The second foo.a adds a
second lazy symbol and everything works.
The problem is with
... add_weak_undef.o --start-group foo.a add_strong_undef.o --end-group
now at least the bfd linker will go back and fetch members from foo.a
to satisfy undefined symbols added by add_strong_undef.o.
Cheers,
Rafael
More information about the llvm-commits
mailing list