2017-09-07 16:43:56 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
|
|
|
|
.cfi_startproc
|
|
|
|
.cfi_personality 0x1b, bar
|
|
|
|
.cfi_endproc
|
|
|
|
|
|
|
|
.global bar
|
|
|
|
.hidden bar
|
|
|
|
bar:
|
2018-06-27 01:04:47 +08:00
|
|
|
ret
|
2017-09-07 16:43:56 +08:00
|
|
|
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
|
|
|
|
|
|
|
// Check the size of the CIE (0x18 + 4) and FDE (0x10 + 4)
|
2019-05-01 13:49:01 +08:00
|
|
|
// RUN: llvm-readobj -S --section-data %t.o | FileCheck --check-prefix=OBJ %s
|
2017-09-07 16:43:56 +08:00
|
|
|
|
|
|
|
// OBJ: Name: .eh_frame
|
|
|
|
// OBJ-NEXT: Type:
|
|
|
|
// OBJ-NEXT: Flags [
|
|
|
|
// OBJ-NEXT: SHF_ALLOC
|
|
|
|
// OBJ-NEXT: ]
|
|
|
|
// OBJ-NEXT: Address:
|
|
|
|
// OBJ-NEXT: Offset:
|
|
|
|
// OBJ-NEXT: Size:
|
|
|
|
// OBJ-NEXT: Link:
|
|
|
|
// OBJ-NEXT: Info:
|
|
|
|
// OBJ-NEXT: AddressAlignment:
|
|
|
|
// OBJ-NEXT: EntrySize:
|
|
|
|
// OBJ-NEXT: SectionData (
|
|
|
|
// OBJ-NEXT: 0000: 18000000 00000000 017A5052 00017810
|
|
|
|
// OBJ-NEXT: 0010: 061B0000 00001B0C 07089001 10000000
|
|
|
|
// OBJ-NEXT: 0020: 20000000 00000000 00000000 00000000
|
|
|
|
// OBJ-NEXT: )
|
|
|
|
|
2017-10-06 17:37:44 +08:00
|
|
|
// RUN: ld.lld --hash-style=sysv %t.o -no-rosegment -o %t -shared
|
2017-09-07 16:43:56 +08:00
|
|
|
|
|
|
|
// Check that .eh_frame is in the same segment as .text
|
2019-05-01 14:02:16 +08:00
|
|
|
// RUN: llvm-readelf -l %t | FileCheck --check-prefix=PHDR %s
|
2017-09-07 16:43:56 +08:00
|
|
|
|
|
|
|
// PHDR: Segment Sections
|
2018-06-27 01:04:47 +08:00
|
|
|
// PHDR: .eh_frame {{.*}}.text
|
2017-09-07 16:43:56 +08:00
|
|
|
|
|
|
|
// Check that the CIE and FDE are padded with 0x00 and not 0xCC when the
|
|
|
|
// .eh_frame section is placed in the executable segment
|
2019-05-01 13:49:01 +08:00
|
|
|
// RUN: llvm-readobj -S --section-data %t | FileCheck %s
|
2017-09-07 16:43:56 +08:00
|
|
|
|
|
|
|
// CHECK: Name: .eh_frame
|
|
|
|
// CHECK-NEXT: Type:
|
|
|
|
// CHECK-NEXT: Flags
|
|
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address:
|
|
|
|
// CHECK-NEXT: Offset:
|
|
|
|
// CHECK-NEXT: Size:
|
|
|
|
// CHECK-NEXT: Link:
|
|
|
|
// CHECK-NEXT: Info:
|
|
|
|
// CHECK-NEXT: AddressAlignment:
|
|
|
|
// CHECK-NEXT: EntrySize:
|
|
|
|
// CHECK-NEXT: SectionData (
|
|
|
|
// CHECK-NEXT: 0000: 1C000000 00000000 017A5052 00017810
|
2018-06-27 01:04:47 +08:00
|
|
|
// CHECK-NEXT: 0010: 061B2A00 00001B0C 07089001 00000000
|
|
|
|
// CHECK-NEXT: 0020: 14000000 24000000 14000000 00000000
|
2017-09-07 16:43:56 +08:00
|
|
|
// CHECK-NEXT: 0030: 00000000 00000000
|
|
|
|
// CHECK-NEXT: )
|