2016-09-28 16:42:02 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
|
|
|
# RUN: ld.lld -o %t1 %t
|
|
|
|
# RUN: llvm-objdump -section-headers %t1 | FileCheck %s
|
2016-10-04 20:05:42 +08:00
|
|
|
# RUN: ld.lld -r -o %t1 %t
|
|
|
|
# RUN: llvm-objdump -section-headers %t1 | FileCheck --check-prefix=RELOCATABLE %s
|
|
|
|
|
2016-09-28 16:42:02 +08:00
|
|
|
# CHECK-NOT: .aaa
|
2016-10-04 20:05:42 +08:00
|
|
|
# RELOCATABLE: .aaa
|
2016-09-28 16:42:02 +08:00
|
|
|
|
|
|
|
.globl _start
|
|
|
|
_start:
|
|
|
|
jmp _start
|
|
|
|
|
|
|
|
.section .aaa,"ae"
|
2016-10-04 20:05:42 +08:00
|
|
|
.quad .bbb
|
|
|
|
|
|
|
|
.section .bbb,"a"
|
2016-09-28 16:42:02 +08:00
|
|
|
.quad 0
|