llvm-project/lld/test
Rui Ueyama 70f11d7589 Fix Weak External symbol handling.
The fallback atom was used only when it's searching for a symbol in a library;
if an undefined symbol was not found in a library, the LLD looked for its
fallback symbol in the library.

Although it worked in most cases, because symbols with fallbacks usually occur
only in OLDNAMES.LIB (a standard library), that behavior was incompatible with
link.exe. This patch fixes the issue so that the semantics is the same as
MSVC's link.exe

The new (and correct, I believe) behavior is this:

 - If there's no definition for an undefined atom, replace the undefined atom
   with its fallback and then proceed (e.g. look in the next file or stop
   linking as usual.)

Weak External symbols are underspecified in the Microsoft PE/COFF spec. However,
as long as I observed the behavior of link.exe, this seems to be what we want
for compatibility.

Differential Revision: http://llvm-reviews.chandlerc.com/D2162

llvm-svn: 195269
2013-11-20 20:51:55 +00:00
..
Driver [lld][InputGraph] Change the Resolver to use inputGraph 2013-10-07 02:47:09 +00:00
Unit [tests] Update to use lit_config and lit package, as appropriate. 2013-08-09 18:51:17 +00:00
core Fix Weak External symbol handling. 2013-11-20 20:51:55 +00:00
darwin [mach-o] revert gunk added to test cases to debug build bot failures 2013-11-08 23:18:51 +00:00
elf Add explictly exported atoms and export R_*_COPY'ed atoms. 2013-11-08 21:04:20 +00:00
pecoff Fix Weak External symbol handling. 2013-11-20 20:51:55 +00:00
CMakeLists.txt Add llc to check-lld deps. We use the command in lit.cfg. 2013-09-02 23:26:00 +00:00
linker-script.test [lld][ELF] Add parser for linker script ENTRY command 2013-06-03 18:05:21 +00:00
lit.cfg [PECOFF] Add a test for the resource file. 2013-11-04 05:17:54 +00:00
lit.site.cfg.in [tests] Update to use lit_config and lit package, as appropriate. 2013-08-09 18:51:17 +00:00