brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 2a9e2a2 Raw
76 lines · plain
1## Check that llvm-bolt is able to overwrite LSDA in ULEB128 format in-place for2## all types of binaries.3 4# REQUIRES: system-linux5 6# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o7# RUN: ld.lld --no-pie %t.o -o %t.exe -q8# RUN: ld.lld --pie %t.o -o %t.pie -q9# RUN: ld.lld --shared %t.o -o %t.so -q10# RUN: llvm-bolt %t.exe -o %t.bolt --strict \11# RUN:   | FileCheck --check-prefix=CHECK-BOLT %s12# RUN: llvm-bolt %t.pie -o %t.pie.bolt --strict \13# RUN:   | FileCheck --check-prefix=CHECK-BOLT %s14# RUN: llvm-bolt %t.so -o %t.so.bolt --strict \15# RUN:   | FileCheck --check-prefix=CHECK-BOLT %s16 17# CHECK-BOLT: rewriting .gcc_except_table in-place18 19# RUN: llvm-readelf -WS %t.bolt | FileCheck --check-prefix=CHECK-ELF %s20# RUN: llvm-readelf -WS %t.pie.bolt | FileCheck --check-prefix=CHECK-ELF %s21# RUN: llvm-readelf -WS %t.so.bolt | FileCheck --check-prefix=CHECK-ELF %s22 23# CHECK-ELF-NOT: .bolt.org.gcc_except_table24 25  .text26  .global foo27  .type foo, %function28foo:29  .cfi_startproc30  ret31  .cfi_endproc32  .size foo, .-foo33 34  .globl _start35  .type _start, %function36_start:37.Lfunc_begin0:38  .cfi_startproc39  .cfi_lsda 27, .Lexception040  call foo41.Ltmp0:42  call foo43.Ltmp1:44  ret45 46## Landing pads.47.LLP1:48  ret49.LLP0:50  ret51 52  .cfi_endproc53.Lfunc_end0:54  .size _start, .-_start55 56## EH table.57  .section  .gcc_except_table,"a",@progbits58  .p2align  259GCC_except_table0:60.Lexception0:61  .byte 255                             # @LPStart Encoding = omit62  .byte 255                             # @TType Encoding = omit63  .byte 1                               # Call site Encoding = uleb12864  .uleb128 .Lcst_end0-.Lcst_begin065.Lcst_begin0:66  .uleb128 .Lfunc_begin0-.Lfunc_begin0  # >> Call Site 1 <<67  .uleb128 .Ltmp0-.Lfunc_begin0         #   Call between .Lfunc_begin0 and .Ltmp068  .uleb128 .LLP0-.Lfunc_begin0          #   jumps to .LLP069  .byte 0                               #   On action: cleanup70  .uleb128 .Ltmp0-.Lfunc_begin0         # >> Call Site 2 <<71  .uleb128 .Ltmp1-.Ltmp0                #   Call between .Ltmp0 and .Ltmp172  .uleb128 .LLP1-.Lfunc_begin0          #     jumps to .LLP173  .byte 0                               #   On action: cleanup74.Lcst_end0:75 76