87 lines · plain
1# REQUIRES: x862## Regression test for https://github.com/llvm/llvm-project/issues/630393 4## Use an old version to ensure we do *not* have any compact-unwind.5# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos9 %s -o %t.o6 7## Pre-cond: smoke-check that there is really no compact-unwind entries - only dwarfs.8# RUN: llvm-objdump --macho --unwind-info --dwarf=frames %t.o | FileCheck %s --check-prefix=PRE9# PRE-NOT: Contents of __compact_unwind section:10# PRE-NOT: Entry at offset11# PRE: .eh_frame contents:12# PRE: {{[0-9a-f]+}} {{.*}} CIE13# PRE: Format: DWARF3214# PRE: Version: 115 16## Link should succeed (ie., not crashed due to bug in icf code).17# RUN: %lld -lSystem -lc++ --icf=all -arch x86_64 -arch x86_64 -platform_version macos 11.0 11.0 %t.o -o %t.out18 19## Post-cond: verify that the final binary has expected eh-frame contents.20# RUN: llvm-objdump --macho --syms --dwarf=frames %t.out | FileCheck %s --check-prefix=POST21# POST-LABEL: SYMBOL TABLE:22# POST: [[#%x,EXCEPT_ADDR:]] l O __TEXT,__gcc_except_tab GCC_except_table023# POST: [[#%x,EXCEPT_ADDR]] l O __TEXT,__gcc_except_tab GCC_except_table124# POST: [[#%.16x,F0_ADDR:]] g F __TEXT,__text _f025# POST: [[#%.16x,F1_ADDR:]] g F __TEXT,__text _f126# POST: [[#%.16x,G_ADDR:]] g F __TEXT,__text _g27 28# POST-LABEL: .eh_frame contents:29# POST: {{.*}} FDE cie={{.+}} pc=[[#%x,G_ADDR]]...{{.+}}30 31# POST: {{.*}} FDE cie={{.+}} pc=[[#%x,F0_ADDR]]...{{.+}}32# POST: Format: DWARF32 33# POST: LSDA Address: [[#%.16x,EXCEPT_ADDR]]34 35# POST: {{.*}} FDE cie={{.+}} pc=[[#%x,F1_ADDR]]...{{.+}}36# POST Format: DWARF32 37# POST LSDA Address: [[#%.16x,EXCEPT_ADDR]]38 39 .section __TEXT,__text,regular,pure_instructions40 .globl _f041_f0:42 .cfi_startproc43 .cfi_lsda 16, Lexception044 .cfi_def_cfa_offset 1645 .cfi_offset %rbp, -1646 callq _g47 retq48 .cfi_endproc49 50 .section __TEXT,__gcc_except_tab51GCC_except_table0:52Lexception0:53 .byte 25554 55 .section __TEXT,__text,regular,pure_instructions56 .globl _f157_f1:58 .cfi_startproc59 .cfi_lsda 16, Lexception160 .cfi_def_cfa_offset 1661 .cfi_offset %rbp, -1662 callq _g63 retq64 .cfi_endproc65 66 .section __TEXT,__gcc_except_tab67GCC_except_table1:68Lexception1:69 .byte 25570 71 .section __TEXT,__text,regular,pure_instructions72 .globl _g73_g: 74 .cfi_startproc75 .cfi_def_cfa_offset 1676 .cfi_offset %rbp, -1677 .cfi_def_cfa_register %rbp 78 retq79 .cfi_endproc80 81 .section __TEXT,__text,regular,pure_instructions82 .globl _main 83_main: 84 retq85 86.subsections_via_symbols87