Make --export-dynamic-symbol to pull out object files from archives.
authorRui Ueyama <ruiu@google.com>
Fri, 9 Feb 2018 17:39:06 +0000 (17:39 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 9 Feb 2018 17:39:06 +0000 (17:39 +0000)
commit90b395e93acf4cf860bbedc19d39d88278c892be
tree28f3f10d9c1c0cee2b4165001896b848d8bfff1c
parent0063ce7201dd73e13e1c5165d3d97394627bc714
Make --export-dynamic-symbol to pull out object files from archives.

This is for compatiblity with GNU gold. GNU gold tries to resolve
symbols specified by --export-dynamic-symbol. So, if a symbol specified
by --export-dynamic-symbol is in an archive file, lld's result is
currently different from gold's.

Interestingly, that behavior is different for --dynamic-list.
I added a new test to ensure that.

Differential Revision: https://reviews.llvm.org/D43103

llvm-svn: 324752
lld/ELF/Driver.cpp
lld/test/ELF/dynamic-list-archive.s [new file with mode: 0644]
lld/test/ELF/export-dynamic-symbol.s [new file with mode: 0644]