Skip to content

Commit ac06362

Browse files
committed
Add a test to check both multiple uses and order with --set-symbol-visibility
1 parent 1e93ef4 commit ac06362

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

llvm/test/tools/llvm-objcopy/ELF/skip-symbols.test

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@
3131
# RS-SYM-DAG: foo2
3232
# RS-SYM-DAG: foo3
3333

34+
## Check the functionality when using skip options multiple times.
35+
# RUN: echo "foo3" > %t.symbol.list
36+
# RUN: llvm-objcopy %t.o %t5.o --set-symbol-visibility='foo*'=internal --wildcard \
37+
# RUN: --skip-symbol=foo1 --skip-symbol=foo2 --skip-symbols=%t.symbol.list
38+
# RUN: llvm-readelf -s %t5.o | FileCheck %s --check-prefix=BOTH
39+
## All the symbols are skipped
40+
# BOTH-DAG: GLOBAL HIDDEN 1 foo1
41+
# BOTH-DAG: GLOBAL HIDDEN 1 foo2
42+
# BOTH-DAG: GLOBAL HIDDEN 1 foo3
43+
3444
## Check that using an invalid symbol pattern generates an error.
3545
# RUN: echo '*.' > %t.symbols.regex
3646
# RUN: not llvm-objcopy %t.o --skip-symbols=%t.symbols.regex --regex 2>&1 | \

0 commit comments

Comments
 (0)