brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 8a2cabb Raw
44 lines · plain
1# REQUIRES: x862# RUN: rm -rf %t; split-file %s %t3# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 -emit-compact-unwind-non-canonical=true %t/eh-frame.s -o %t/eh-frame.o4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 -emit-compact-unwind-non-canonical=true %t/cu.s -o %t/cu.o5# RUN: %lld -dylib %t/cu.o %t/eh-frame.o -o %t/out6 7## Sanity check: we want our input to contain a section (and not symbol)8## relocation for the personality reference.9# RUN: llvm-readobj --relocations %t/cu.o | FileCheck %s --check-prefix=SECT-RELOC10# SECT-RELOC:      Section __compact_unwind {11# SECT-RELOC-NEXT:   __text12# SECT-RELOC-NEXT:   __text13# SECT-RELOC-NEXT: }14 15## Verify that the personality referenced via a symbol reloc in eh-frame.s gets16## dedup'ed with the personality referenced via a section reloc in cu.s.17# RUN: llvm-objdump --macho --unwind-info %t/out | FileCheck %s18# CHECK: Personality functions: (count = 1)19 20#--- eh-frame.s21_fun:22  .cfi_startproc23  .cfi_personality 155, _my_personality24  ## cfi_escape cannot be encoded in compact unwind25  .cfi_escape 026  ret27  .cfi_endproc28 29.subsections_via_symbols30 31#--- cu.s32.globl _my_personality33_fun:34  .cfi_startproc35  .cfi_personality 155, _my_personality36  .cfi_def_cfa_offset 1637  ret38  .cfi_endproc39 40_my_personality:41  nop42 43.subsections_via_symbols44