llvm-project/lld/COFF
Zachary Turner 02c5386811 [PDB] Fix bug when using multiple PCH header objects with the same name.
A common pattern in Windows is to have all your precompiled headers
use an object named stdafx.obj.  If you've got a project with many
different static libs, you might use a separate PCH for each one of
these.

During the final link step, a file from A might reference the PCH
object from A, but it will have the same name (stdafx.obj) as any
other PCH from another project.  The only difference will be the
path.  For example, A might be A/stdafx.obj while B is B/stdafx.obj.

The existing algorithm checks only the filename that was passed on
the command line (or stored in archive), but this is insufficient in
the case where relative paths are used, because depending on the
command line object file / library order, it might find the wrong
PCH object first resulting in a signature mismatch.

The fix here is to simply check whether the absolute path of the
PCH object (which is stored in the input obj file for the file that
references the PCH) *ends with* the full relative path of whatever
is specified on the command line (or is in the archive).

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

llvm-svn: 374442
2019-10-10 20:25:51 +00:00
..
CMakeLists.txt [LLD] [COFF] Use the unified llvm demangle frontend function. NFC. 2019-09-27 12:23:45 +00:00
Chunks.cpp [COFF] Rename variale references in comments after VariableName -> variableName change 2019-07-16 08:26:38 +00:00
Chunks.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Config.h [LLD] [COFF] Resolve source locations for undefined references using dwarf 2019-09-25 11:03:48 +00:00
DLL.cpp dummy comment typo fix commit to cycle the bots 2019-10-10 02:04:56 +00:00
DLL.h [COFF] Share the tail in delayimport symbol thunks 2019-07-11 21:19:11 +00:00
DebugTypes.cpp [COFF] Wrap definitions in namespace lld { namespace coff {. NFC 2019-10-10 11:27:58 +00:00
DebugTypes.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Driver.cpp dummy comment typo fix commit to cycle the bots 2019-10-10 02:04:56 +00:00
Driver.h lld-link: Add a flag /lldignoreenv that makes lld-link ignore env vars. 2019-09-13 13:13:52 +00:00
DriverUtils.cpp lld-link: Add a flag /lldignoreenv that makes lld-link ignore env vars. 2019-09-13 13:13:52 +00:00
ICF.cpp dummy comment typo fix commit to cycle the bots 2019-10-10 02:04:56 +00:00
ICF.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
InputFiles.cpp [COFF] Wrap definitions in namespace lld { namespace coff {. NFC 2019-10-10 11:27:58 +00:00
InputFiles.h reland "[lld-link] implement -start-lib and -end-lib" 2019-09-03 20:32:16 +00:00
LTO.cpp [COFF] Wrap definitions in namespace lld { namespace coff {. NFC 2019-10-10 11:27:58 +00:00
LTO.h [lld-link] implement -thinlto-index-only 2019-07-11 18:03:14 +00:00
MapFile.cpp [COFF] Wrap definitions in namespace lld { namespace coff {. NFC 2019-10-10 11:27:58 +00:00
MapFile.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
MarkLive.cpp Fix odd variable names. 2019-07-12 06:12:27 +00:00
MarkLive.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
MinGW.cpp [COFF] Wrap definitions in namespace lld { namespace coff {. NFC 2019-10-10 11:27:58 +00:00
MinGW.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Options.td Add /reproduce option to lld/COFF 2019-10-04 07:27:38 +00:00
PDB.cpp [PDB] Fix bug when using multiple PCH header objects with the same name. 2019-10-10 20:25:51 +00:00
PDB.h [LLD] [COFF] Resolve source locations for undefined references using dwarf 2019-09-25 11:03:48 +00:00
README.md Update the documents of the new LLD. 2016-03-12 06:06:40 +00:00
SymbolTable.cpp [LLD] [COFF] Resolve source locations for undefined references using dwarf 2019-09-25 11:03:48 +00:00
SymbolTable.h reland "[lld-link] implement -start-lib and -end-lib" 2019-09-03 20:32:16 +00:00
Symbols.cpp [LLD] [COFF] Always demangle the __imp_ prefix to __declspec(dllimport) 2019-10-04 19:47:59 +00:00
Symbols.h reland "[lld-link] implement -start-lib and -end-lib" 2019-09-03 20:32:16 +00:00
TypeMerger.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Writer.cpp [COFF] Wrap definitions in namespace lld { namespace coff {. NFC 2019-10-10 11:27:58 +00:00
Writer.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00

README.md

See docs/NewLLD.rst