21 lines
571 B
Text
21 lines
571 B
Text
# REQUIRES: x86
|
|
|
|
## Handling of quotes is tricky sometimes. Check we do that right and include
|
|
## "foo bar" section into ".data foo" as expected.
|
|
|
|
# RUN: echo '.section "foo bar", "aw"; nop' | llvm-mc -filetype=obj -triple=x86_64 - -o %t.o
|
|
# RUN: ld.lld %t.o --script %s -o %t --print-map | FileCheck %s
|
|
# RUN: llvm-readelf -S %t | FileCheck %s --check-prefix=SEC
|
|
# CHECK: .data foo
|
|
# CHECK-NEXT: {{.*}}(foo bar)
|
|
|
|
# SEC: ]{{ }}.data foo
|
|
# SEC: ]{{ }}.data bar
|
|
|
|
SECTIONS {
|
|
" .data foo" : { *("foo bar") }
|
|
}
|
|
|
|
OVERWRITE_SECTIONS {
|
|
" .data bar" : { bar = .; }
|
|
}
|