bolt/deps/llvm-18.1.8/lld/test/ELF/linkerscript/quoted-section-name.test

22 lines
571 B
Text
Raw Normal View History

2025-02-14 19:21:04 +01:00
# 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 = .; }
}