forked from swiftlang/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COFF] Handle .eh_frame$symbol as associative comdat for MinGW
This matches how it is done for .xdata and .pdata already. On i386, the symbol name in the section name suffix does not contain the extra underscore prefix. This is one part of a fix for PR42217. Differential Revision: https://reviews.llvm.org/D63350 llvm-svn: 363456
- Loading branch information
Showing
2 changed files
with
43 additions
and
3 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,37 @@ | ||
# REQUIRES: x86 | ||
|
||
# RUN: llvm-mc -triple=i686-windows-gnu %s -filetype=obj -o %t.obj | ||
|
||
# RUN: lld-link -lldmingw -entry:main %t.obj -out:%t.exe | ||
# RUN: llvm-objdump -s %t.exe | FileCheck %s | ||
|
||
# Check that the .eh_frame comdat was included, even if it had no symbols, | ||
# due to associativity with the symbol _foo. | ||
|
||
# CHECK: Contents of section .eh_fram: | ||
# CHECK: 403000 42 | ||
|
||
.text | ||
.def _main; | ||
.scl 2; | ||
.type 32; | ||
.endef | ||
.globl _main | ||
.p2align 4, 0x90 | ||
_main: | ||
call _foo | ||
ret | ||
|
||
.section .eh_frame$foo,"dr" | ||
.linkonce discard | ||
.byte 0x42 | ||
|
||
.def _foo; | ||
.scl 2; | ||
.type 32; | ||
.endef | ||
.section .text$foo,"xr",discard,foo | ||
.globl _foo | ||
.p2align 4 | ||
_foo: | ||
ret |