[llvm] [llvm-symbolizer] Make symbolizer parse section relative syntax (PR #168524)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 22:32:08 PDT 2026
================
@@ -31,6 +35,24 @@
# EMPTY-OFFSET: error: '(TEXT)()': section-relative offset "" must start with '+'
+## Test negative offset.
+# RUN: llvm-symbolizer --obj=%t.xcoff '(TEXT)(-0x10)' 2>&1 | \
+# RUN: FileCheck %s --check-prefix=NEG-OFFSET
+
+# NEG-OFFSET: error: '(TEXT)(-0x10)': section-relative offset "-0x10" must start with '+'
+
+## Test negative decimal offset.
+# RUN: llvm-symbolizer --obj=%t.xcoff '(TEXT)(-10)' 2>&1 | \
+# RUN: FileCheck %s --check-prefix=NEG-OFFSET-DEC
+
+# NEG-OFFSET-DEC: error: '(TEXT)(-10)': section-relative offset "-10" must start with '+'
+
+## Test offset with '+' followed by '-'.
+# RUN: llvm-symbolizer --obj=%t.xcoff '(TEXT)(+-0x10)' 2>&1 | \
+# RUN: FileCheck %s --check-prefix=PLUS-NEG
+
+# PLUS-NEG: error: '(TEXT)(+-0x10)': invalid offset "+-0x10" in section-relative address
----------------
midhuncodes7 wrote:
Consolidated tests expecting similar pattern under one check
https://github.com/llvm/llvm-project/pull/168524
More information about the llvm-commits
mailing list