2016-05-20 02:15:54 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
|
|
|
|
|
|
|
# RUN: echo "SECTIONS {.foo : {*(.foo.*)} }" > %t.script
|
|
|
|
# RUN: ld.lld -o %t1 --script %t.script %t
|
2020-03-16 08:47:44 +08:00
|
|
|
# RUN: llvm-objdump --section-headers %t1 | FileCheck %s
|
2016-05-20 02:15:54 +08:00
|
|
|
# CHECK: Sections:
|
2019-01-28 23:03:47 +08:00
|
|
|
# CHECK-NEXT: Idx Name Size VMA Type
|
2016-09-21 04:48:54 +08:00
|
|
|
# CHECK-NOT: .foo
|
|
|
|
# CHECK: .foo 00000008 {{.*}} DATA
|
|
|
|
# CHECK-NOT: .foo
|
|
|
|
|
2016-05-20 02:15:54 +08:00
|
|
|
|
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
nop
|
|
|
|
|
|
|
|
.section .foo.1,"a"
|
|
|
|
foo1:
|
|
|
|
.long 0
|
|
|
|
|
|
|
|
.section .foo.2,"aw"
|
|
|
|
foo2:
|
|
|
|
.long 0
|