[llvm] [llvm-objcopy] Add --skip-symbol and --skip-symbols options (PR #80873)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 01:57:13 PDT 2024


================
@@ -0,0 +1,78 @@
+# RUN: yaml2obj %s -o %t.o
+# RUN: echo 'foo[2-3]' > %t.skip.regex
+
+## Check --skip-symbols functionality when changing symbol bindings.
+# RUN: llvm-objcopy %t.o %t1.o --localize-hidden --skip-symbols=%t.skip.regex --regex
+# RUN: llvm-readelf -s %t1.o | FileCheck %s --check-prefix=LH-SYMS
+# LH-SYMS-DAG: LOCAL  HIDDEN      1 foo1
+# LH-SYMS-DAG: GLOBAL HIDDEN      1 foo2
+# LH-SYMS-DAG: GLOBAL HIDDEN      1 foo3
+
+## Check --skip-symbol functionality when changing symbol bindings.
----------------
jh7370 wrote:

Similar to my above comment, I'd swap this around with the previous check, so that the "main" option is tested first. Applies for each of the other pair of cases too.

https://github.com/llvm/llvm-project/pull/80873


More information about the llvm-commits mailing list