Sterling Augustine | 48b4697 | 2018-08-13 22:29:15 | [diff] [blame] | 1 | # REQUIRES: x86 |
| 2 | # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/x86-64-split-stack-extra.s -o %t2.o |
| 3 | # RUN: ld.lld --defsym __morestack=0x100 --defsym __morestack_non_split=0x200 %t2.o -o %t4.so -shared |
| 4 | |
| 5 | # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o |
| 6 | # RUN: ld.lld --defsym __morestack=0x100 --defsym __morestack_non_split=0x200 %t1.o %t4.so -o %t |
| 7 | # RUN: llvm-objdump -d %t | FileCheck %s |
| 8 | |
| 9 | # For a cross .so call, make sure lld produced the conservative call to __morestack_non_split. |
| 10 | # CHECK: prologue1_cross_so_call: |
| 11 | # CHECK-NEXT: stc{{.*$}} |
| 12 | # CHECK-NEXT: nopl{{.*$}} |
| 13 | # CHECK: jae{{.*$}} |
| 14 | # CHECK-NEXT: callq{{.*}}<__morestack_non_split> |
| 15 | |
| 16 | .text |
| 17 | |
| 18 | .global prologue1_cross_so_call |
| 19 | .type prologue1_cross_so_call,@function |
| 20 | prologue1_cross_so_call: |
| 21 | cmp %fs:0x70,%rsp |
| 22 | jae 1f |
| 23 | callq __morestack |
| 24 | retq |
| 25 | 1: |
| 26 | callq split |
| 27 | retq |
| 28 | .size prologue1_cross_so_call,. - prologue1_cross_so_call |
| 29 | |
| 30 | .section .note.GNU-stack,"",@progbits |
| 31 | .section .note.GNU-split-stack,"",@progbits |