llvm-project/lld/test/core
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
..
absolute-basic.objtxt
absolute-local.objtxt
archive-basic.objtxt
archive-chain.objtxt
archive-tentdef-search.objtxt
auto-hide-coalesce.objtxt
constants-coalesce.objtxt
cstring-coalesce.objtxt
custom-section.objtxt
dead-strip-attributes.objtxt
dead-strip-basic.objtxt
dead-strip-globals.objtxt
empty.objtxt
error-atom-attribute.objtxt Test: Move input redirections at the end of the line. 2013-11-14 20:52:28 +00:00
error-atom-content-byte-value.objtxt Test: Move input redirections at the end of the line. 2013-11-14 20:52:28 +00:00
error-atom-content-bytes.objtxt Test: Move input redirections at the end of the line. 2013-11-14 20:52:28 +00:00
error-atom-type.objtxt Test: Move input redirections at the end of the line. 2013-11-14 20:52:28 +00:00
error-atom-undefined-wrong-attribue.objtxt Test: Move input redirections at the end of the line. 2013-11-14 20:52:28 +00:00
error-duplicate-absolutes.objtxt Test for r194671. 2013-11-14 19:18:54 +00:00
error-file-attribute.objtxt Test: Move input redirections at the end of the line. 2013-11-14 20:52:28 +00:00
error-fixup-attribute.objtxt Test: Move input redirections at the end of the line. 2013-11-14 20:52:28 +00:00
error-fixup-target.objtxt Test: Move input redirections at the end of the line. 2013-11-14 20:52:28 +00:00
fixups-addend.objtxt
fixups-dup-named.objtxt
fixups-named.objtxt
fixups-unnamed.objtxt
ingroup-test-big.objtxt
ingroup-test-loop.objtxt
ingroup-test-with-layout-after.objtxt
ingroup-test.objtxt
inline-coalesce.objtxt
layout-error-test.objtxt
layout-transitivity.objtxt Run layout-transitivity test only when debugging is enabled. 2013-10-23 21:15:48 +00:00
layoutafter-test.objtxt
layoutbefore-test.objtxt
multiple-def-error.objtxt
pass-got-basic.objtxt
pass-stubs-basic.objtxt
permissions.objtxt
section-position.objtxt
shared-library-basic.objtxt [Core] Add type and size to SharedLibraryAtom. 2013-09-26 22:08:43 +00:00
shared-library-coalesce.objtxt
tent-merge.objtxt
undef-coalesce-error.objtxt Test: Move input redirections at the end of the line. 2013-11-14 20:52:28 +00:00
undef-coalesce.objtxt
undef-fallback.objtxt Fix Weak External symbol handling. 2013-11-20 20:51:55 +00:00
undef-weak-coalesce.objtxt Fix Weak External symbol handling. 2013-11-20 20:51:55 +00:00
weak-coalesce.objtxt