[all-commits] [llvm/llvm-project] b38f57: [LLD] [COFF] Try to report source locations for du...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Fri Oct 18 03:42:08 PDT 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b38f577c015c210605c2e463e9ac6a03249225a2
https://github.com/llvm/llvm-project/commit/b38f577c015c210605c2e463e9ac6a03249225a2
Author: Martin Storsjo <martin at martin.st>
Date: 2019-10-18 (Fri, 18 Oct 2019)
Changed paths:
M lld/COFF/InputFiles.cpp
M lld/COFF/InputFiles.h
M lld/COFF/SymbolTable.cpp
M lld/COFF/SymbolTable.h
M lld/test/COFF/conflict-mangled.test
M lld/test/COFF/conflict.test
A lld/test/COFF/duplicate-cv.s
A lld/test/COFF/duplicate-dwarf.s
M lld/test/COFF/duplicate.test
Log Message:
-----------
[LLD] [COFF] Try to report source locations for duplicate symbols
This fixes the second part of PR42407.
For files with dwarf debug info, it manually loads and iterates
.debug_info to find the declared location of variables, to allow
reporting them. (This matches the corresponding code in the ELF
linker.)
For functions, it uses the existing getFileLineDwarf which uses
LLVMSymbolizer for translating addresses to file lines.
In object files with codeview debug info, only the source location
of duplicate functions is printed. (And even there, only for the
first input file. The getFileLineCodeView function requires the
object file to be fully loaded and initialized to properly resolve
source locations, but duplicate symbols are reported at a stage when
the second object file isn't fully loaded yet.)
Differential Revision: https://reviews.llvm.org/D68975
llvm-svn: 375218
More information about the All-commits
mailing list