2017-07-19 02:40:50 +08:00
|
|
|
# REQUIRES: x86
|
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
|
2020-03-16 08:47:44 +08:00
|
|
|
# RUN: llvm-objdump --section-headers %t | FileCheck %s
|
2016-10-05 18:10:45 +08:00
|
|
|
|
|
|
|
# CHECK: .text
|
2016-10-06 04:09:50 +08:00
|
|
|
# CHECK-NEXT: .rela.text
|
2016-11-12 06:43:27 +08:00
|
|
|
# CHECK: .text._init
|
2016-10-05 18:10:45 +08:00
|
|
|
# CHECK-NEXT: .rela.text._init
|
2016-11-12 06:43:27 +08:00
|
|
|
# CHECK: .text._fini
|
2016-10-05 18:10:45 +08:00
|
|
|
# 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
|