2016-10-05 18:10:45 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
|
|
|
|
# RUN: ld.lld -r %t1.o -o %t
|
|
|
|
# RUN: llvm-objdump -section-headers %t | FileCheck %s
|
|
|
|
|
|
|
|
# CHECK: .text
|
|
|
|
# CHECK-NEXT: .text._init
|
|
|
|
# CHECK-NEXT: .text._fini
|
2016-10-06 04:09:50 +08:00
|
|
|
# CHECK-NEXT: .rela.text
|
2016-10-05 18:10:45 +08:00
|
|
|
# CHECK-NEXT: .rela.text._init
|
|
|
|
# CHECK-NEXT: .rela.text._fini
|
|
|
|
|
|
|
|
.globl _start
|
|
|
|
_start:
|
|
|
|
call foo
|
|
|
|
nop
|
|
|
|
|
|
|
|
.section .xxx,"a"
|
|
|
|
.quad 0
|
|
|
|
|
|
|
|
.section .text._init,"ax"
|
|
|
|
.quad .xxx
|
|
|
|
foo:
|
|
|
|
call bar
|
|
|
|
nop
|
|
|
|
|
|
|
|
|
|
|
|
.section .text._fini,"ax"
|
|
|
|
.quad .xxx
|
|
|
|
bar:
|
|
|
|
nop
|