[llvm] [BOLT][DWARF] Fix handling of debug-str-offsets (PR #75100)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 15:25:50 PST 2023


================
@@ -0,0 +1,66 @@
+# REQUIRES: system-linux
+
+# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5_main.s -o %tmain.o
+# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5_helper.s -o %thelper.o
+# RUN: %clang %cflags -dwarf-5 %tmain.o %thelper.o -o %t.exe -Wl,-q
+# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
+# RUN: llvm-dwarfdump --show-form --verbose --debug-str-offsets %t.exe > %t.txt
+# RUN: llvm-dwarfdump --show-form --verbose --debug-str-offsets %t.bolt >> %t.txt
+# RUN: cat %t.txt | FileCheck --check-prefix=CHECK %s
+
+# This test checks we correclty re-renerate .debug-str-offsets.
----------------
maksfb wrote:

There's a trend to use double `#` for comments without directives. Also, the section name should be `.debug_str_offsets`.

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


More information about the llvm-commits mailing list