49 lines · plain
1// RUN: llvm-mc -triple aarch64-none-linux-gnu -filetype=obj %s -o %t2// RUN: llvm-objdump -s %t | FileCheck %s3 .text4 .globl foo5 .type foo,@function6foo:7 .cfi_startproc8 ret9 .cfi_endproc10 11// The really key points we're checking here are:12// * Return register is x30.13// * Pointer format is 0x1b (GNU doesn't appear to understand others).14 15// The rest is largely incidental, but not expected to change regularly.16 17// Output is:18 19// CHECK: Contents of section .eh_frame:20// CHECK-NEXT: 0000 10000000 00000000 017a5200 017c1e01 .........zR..|..21// CHECK-NEXT: 0010 1b0c1f00 10000000 18000000 00000000 ................22 23 24// Won't check the rest, it's rather incidental.25// 0020 04000000 00000000 ........26 27 28 29// The first CIE:30// -------------------31// 10000000: length of first CIE = 0x1032// 00000000: This is a CIE33// 03: version = 0x334// 7a 52 00: augmentation string "zR" -- pointer format is specified35// 01: code alignment factor 136// 7c: data alignment factor -437// 1e: return address register 30 (== x30).38// 01: 1 byte of augmentation39// 1b: pointer format 1b: DW_EH_PE_pcrel | DW_EH_PE_sdata440// 0c 1f 00: initial instructions: "DW_CFA_def_cfa x31 ofs 0" in this case41 42// Next the FDE:43// -------------44// 10000000: FDE length 0x1045// 18000000: Uses CIE 0x18 backwards (only coincidentally same as above)46// 00000000: PC begin for this FDE is at 00000000 (relocation is applied here)47// 04000000: FDE applies up to PC begin+0x1448// 00: Augmentation string length 0 for this FDE49