]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/x86-64-split-stack-prologue-adjust-silent.s
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / x86-64-split-stack-prologue-adjust-silent.s
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/x86-64-split-stack-main.s -o %t2.o
4
5 # RUN: ld.lld --defsym __morestack=0x100 %t1.o %t2.o -o %t
6 # RUN: llvm-objdump -d %t 2>&1 | FileCheck %s
7
8 # An unknown prologue ordinarily gives a match failure, except that this
9 # object file includes a .note.GNU-no-split-stack section, which tells the
10 # linker to expect such prologues, and therefore not error.
11
12 # CHECK: __morestack
13
14         .text
15
16         .global unknown_prologue
17         .type   unknown_prologue,@function
18 unknown_prologue:
19         push %rbp
20         mov %rsp,%rbp
21         cmp %fs:0x70,%rsp
22         jae 1f
23         callq __morestack
24         retq
25 1:
26         callq non_split
27         leaveq
28         retq
29
30         .size unknown_prologue,. - unknown_prologue
31         .section .note.GNU-split-stack,"",@progbits
32         .section .note.GNU-no-split-stack,"",@progbits