aboutsummaryrefslogtreecommitdiff
path: root/bolt/test
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-06-03 13:18:58 -0700
committerFangrui Song <i@maskray.me>2024-06-03 13:18:58 -0700
commit6ef632ad36c522b03cf03c7dd76184a35d3b7f41 (patch)
treed03a52caa10faa63b789c47766964ce0189d9942 /bolt/test
parentc93312a63db8e8c87b14e1828c5a4d1eac5aac20 (diff)
downloadllvm-6ef632ad36c522b03cf03c7dd76184a35d3b7f41.zip
llvm-6ef632ad36c522b03cf03c7dd76184a35d3b7f41.tar.gz
llvm-6ef632ad36c522b03cf03c7dd76184a35d3b7f41.tar.bz2
[BOLT,test] Fix lsda.ldscript when MAXPAGESIZE>=0x10000
The intention is to check a section name different from .gcc_except_table . Rather than using a linker script, use llvm-objcopy --rename-section instead.
Diffstat (limited to 'bolt/test')
-rw-r--r--bolt/test/Inputs/lsda.ldscript10
-rw-r--r--bolt/test/lsda-section-name.cpp9
2 files changed, 4 insertions, 15 deletions
diff --git a/bolt/test/Inputs/lsda.ldscript b/bolt/test/Inputs/lsda.ldscript
deleted file mode 100644
index 011e0c6..0000000
--- a/bolt/test/Inputs/lsda.ldscript
+++ /dev/null
@@ -1,10 +0,0 @@
-SECTIONS {
- .interp : { *(.interp) }
- . = ALIGN(CONSTANT(MAXPAGESIZE));
- .text : { *(.text*) }
- . = ALIGN(CONSTANT(MAXPAGESIZE));
- .gcc_except_table.main : { *(.gcc_except_table*) }
- . = 0x20000;
- .eh_frame : { *(.eh_frame) }
- . = 0x80000;
-}
diff --git a/bolt/test/lsda-section-name.cpp b/bolt/test/lsda-section-name.cpp
index 41fb176..34a736f 100644
--- a/bolt/test/lsda-section-name.cpp
+++ b/bolt/test/lsda-section-name.cpp
@@ -1,11 +1,10 @@
// This test check that LSDA section named by .gcc_except_table.main is
// disassembled by BOLT.
-// RUN: %clang++ %cxxflags -O3 -no-pie -c %s -o %t.o
-// RUN: %clang++ %cxxflags -no-pie -fuse-ld=lld %t.o -o %t.exe \
-// RUN: -Wl,-q -Wl,--script=%S/Inputs/lsda.ldscript
-// RUN: llvm-readelf -SW %t.exe | FileCheck %s
-// RUN: llvm-bolt %t.exe -o %t.bolt
+// RUN: %clang++ %cxxflags -O3 -no-pie -fuse-ld=lld %t.o -o %t
+// RUN: llvm-objcopy --rename-section .gcc_except_table=.gcc_except_table.main %t
+// RUN: llvm-readelf -SW %t | FileCheck %s
+// RUN: llvm-bolt %t -o %t.bolt
// CHECK: .gcc_except_table.main