-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COFF] Handle comdat sections without leader symbols
Discard them unless they have been associated by other means (yet uimplemented). According to MS link.exe, such sections are illegal, but MinGW setups use them in their take on associative comdats. This avoids leaving references to the bogus SectionChunk* PendingComdat, which cannot be dereferenced. This fixes PR38183. Differential Revision: https://reviews.llvm.org/D49653 llvm-svn: 338064
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# REQUIRES: x86 | ||
|
||
# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj | ||
|
||
# RUN: not lld-link -lldmingw -out:%t.exe -entry:main -subsystem:console %t.obj 2>&1 | FileCheck %s | ||
|
||
# CHECK: error: undefined symbol: other | ||
|
||
# Check that the comdat section without a symbol isn't left pending once we iterate symbols | ||
# to print source of the undefined symbol. | ||
|
||
.text | ||
.globl main | ||
main: | ||
call other | ||
ret | ||
|
||
.section .data$pending,"w" | ||
.linkonce discard | ||
.Llocal: | ||
.byte 0 |