2016-03-03 15:49:35 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/relocatable-ehframe.s -o %t2.o
|
|
|
|
# RUN: ld.lld -r %t1.o %t2.o -o %t
|
2016-03-11 22:54:03 +08:00
|
|
|
# RUN: llvm-readobj -r -s -section-data %t | FileCheck %s
|
|
|
|
|
|
|
|
# CHECK: Name: .strtab
|
|
|
|
# CHECK-NEXT: Type: SHT_STRTAB
|
|
|
|
# CHECK-NEXT: Flags [
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
# CHECK-NEXT: Address:
|
|
|
|
# CHECK-NEXT: Offset
|
2016-03-11 22:57:33 +08:00
|
|
|
# CHECK-NEXT: Size: 9
|
2016-03-11 22:54:03 +08:00
|
|
|
# CHECK-NEXT: Link: 0
|
|
|
|
# CHECK-NEXT: Info: 0
|
|
|
|
# CHECK-NEXT: AddressAlignment: 1
|
|
|
|
# CHECK-NEXT: EntrySize: 0
|
|
|
|
# CHECK-NEXT: SectionData (
|
2016-03-11 22:57:33 +08:00
|
|
|
# CHECK-NEXT: 0000: 00005F73 74617274 00 |.._start.|
|
2016-03-11 22:54:03 +08:00
|
|
|
# CHECK-NEXT: )
|
2016-03-03 15:49:35 +08:00
|
|
|
|
|
|
|
# CHECK: Relocations [
|
|
|
|
# CHECK-NEXT: Section {{.*}} .rela.eh_frame {
|
|
|
|
# CHECK-NEXT: 0x20 R_X86_64_PC32 foo 0x0
|
|
|
|
# CHECK-NEXT: 0x34 R_X86_64_PC32 bar 0x0
|
|
|
|
# CHECK-NEXT: 0x48 R_X86_64_PC32 dah 0x0
|
|
|
|
# CHECK-NEXT: 0x78 R_X86_64_PC32 foo1 0x0
|
|
|
|
# CHECK-NEXT: 0x8C R_X86_64_PC32 bar1 0x0
|
|
|
|
# CHECK-NEXT: 0xA0 R_X86_64_PC32 dah1 0x0
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
|
|
|
|
.section foo,"ax",@progbits
|
|
|
|
.cfi_startproc
|
|
|
|
nop
|
|
|
|
.cfi_endproc
|
|
|
|
|
|
|
|
.section bar,"ax",@progbits
|
|
|
|
.cfi_startproc
|
|
|
|
nop
|
|
|
|
.cfi_endproc
|
|
|
|
|
|
|
|
.section dah,"ax",@progbits
|
|
|
|
.cfi_startproc
|
|
|
|
nop
|
|
|
|
.cfi_endproc
|
|
|
|
|
|
|
|
.text
|
2016-03-11 22:54:03 +08:00
|
|
|
.globl _start
|
2016-03-03 15:49:35 +08:00
|
|
|
_start:
|
|
|
|
nop
|