summaryrefslogtreecommitdiff
path: root/bolt/test
diff options
context:
space:
mode:
authorAmir Ayupov <aaupov@fb.com>2023-02-06 18:06:54 -0800
committerAmir Ayupov <aaupov@fb.com>2023-02-06 18:08:13 -0800
commitc8482da779a9cd5fa34c094639942ab4eb515cc1 (patch)
treef53357f1396fd2c3781f23a1ca3b33e69f12083b /bolt/test
parentbe2f67c4d87deb513ba200ab3f4dba385faf709a (diff)
downloadllvm-c8482da779a9cd5fa34c094639942ab4eb515cc1.tar.gz
[BOLT] Reintroduce allow-stripped
Reject stripped binaries as a policy. The core issue with stripped binaries is that we can't detect the presence of split functions which require extra handling. Therefore BOLT can't ensure functional correctness of produced binary if the input stripped binary contains split functions. Supporting such cases is an interesting problem but it goes against BOLT's intended goal of achieving peak program performance. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D142686
Diffstat (limited to 'bolt/test')
-rw-r--r--bolt/test/X86/broken_dynsym.test2
-rw-r--r--bolt/test/X86/is-strip.s7
2 files changed, 5 insertions, 4 deletions
diff --git a/bolt/test/X86/broken_dynsym.test b/bolt/test/X86/broken_dynsym.test
index c715be88450e..9e7ed405afba 100644
--- a/bolt/test/X86/broken_dynsym.test
+++ b/bolt/test/X86/broken_dynsym.test
@@ -3,6 +3,6 @@
# RUN: yaml2obj %p/Inputs/broken_dynsym.yaml -o %t
# RUN: llvm-strip -s %t
-# RUN: llvm-bolt %t -o %t.bolt | FileCheck %s
+# RUN: llvm-bolt %t -o %t.bolt --allow-stripped | FileCheck %s
# CHECK-NOT: section index out of bounds
diff --git a/bolt/test/X86/is-strip.s b/bolt/test/X86/is-strip.s
index aaffb0027eb5..9d10845a0243 100644
--- a/bolt/test/X86/is-strip.s
+++ b/bolt/test/X86/is-strip.s
@@ -4,7 +4,8 @@
# RUN: llvm-bolt %t -o %t.out 2>&1 | FileCheck %s -check-prefix=CHECK-NOSTRIP
# RUN: cp %t %t.stripped
# RUN: llvm-strip -s %t.stripped
-# RUN: llvm-bolt %t.stripped -o %t.out 2>&1 | FileCheck %s -check-prefix=CHECK-STRIP
+# RUN: not llvm-bolt %t.stripped -o %t.out 2>&1 | FileCheck %s -check-prefix=CHECK-STRIP
+# RUN: llvm-bolt %t.stripped -o %t.out --allow-stripped 2>&1 | FileCheck %s -check-prefix=CHECK-NOSTRIP
-# CHECK-NOSTRIP-NOT: BOLT-INFO: input binary is stripped. The support is limited and is considered experimental.
-# CHECK-STRIP: BOLT-INFO: input binary is stripped. The support is limited and is considered experimental.
+# CHECK-NOSTRIP-NOT: BOLT-ERROR: stripped binaries are not supported.
+# CHECK-STRIP: BOLT-ERROR: stripped binaries are not supported.