COFF: Don't add new undefined symbols for /alternatename.
authorRui Ueyama <ruiu@google.com>
Fri, 19 Jun 2015 19:23:43 +0000 (19:23 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 19 Jun 2015 19:23:43 +0000 (19:23 +0000)
commit4d2834bd7b3aceb5c8c0944f65d3a08b3b731a7a
tree5e4e1f0967f121745c8778f81e3b6d7e819fe887
parent8ec15ea60ad09065778b2d20a02c62ee25008542
COFF: Don't add new undefined symbols for /alternatename.

Alternatename option is in the form of /alternatename:<from>=<to>.
It's effect is to resolve <from> as <to> if <from> is still undefined
at end of name resolution.

If <from> is not undefined but completely a new symbol, alternatename
shouldn't do anything. Previously, it introduced a new undefined
symbol for <from>, which resulted in undefined symbol error.

llvm-svn: 240161
lld/COFF/Driver.cpp
lld/COFF/SymbolTable.cpp
lld/test/COFF/alternatename.test