[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / x86-64-split-stack-prologue-adjust-silent.s
blob0c82943f8dd1e44dc6880c7c78ebb1e8e5b17afc
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
5 # RUN: ld.lld --defsym __morestack=0x100 --defsym __morestack_non_split=0x200 %t1.o %t2.o -o %t
6 # RUN: llvm-objdump -d %t 2>&1 | FileCheck %s
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.
12 # CHECK: __morestack
14 .text
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
26 callq non_split
27 leaveq
28 retq
30 .size unknown_prologue,. - unknown_prologue
31 .section .note.GNU-split-stack,"",@progbits
32 .section .note.GNU-no-split-stack,"",@progbits