Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COFF] Accept discarded relocations in DWARF debug sections
DWARF debug sections can also contain relocations against symbols in discared segments. LLD should accept such relocations. Differential Revision: https://reviews.llvm.org/D35526 llvm-svn: 308315
- Loading branch information
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t1.obj %s | ||
# RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t2.obj %s | ||
|
||
# LLD should not error on relocations in DWARF debug sections against symbols in | ||
# discarded sections. | ||
# RUN: lld-link -entry:main -debug %t1.obj %t2.obj | ||
|
||
.section .text,"xr",discard,main | ||
.globl main | ||
main: | ||
f: | ||
retq | ||
|
||
.section .debug_info,"dr" | ||
.quad f |