[llvm] [llvm-readobj][COFF] Implement --coff-pseudoreloc in llvm-readobj to dump runtime pseudo-relocation records (PR #151816)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 7 01:54:07 PDT 2025
================
@@ -1,97 +1,214 @@
-RUN: llvm-readobj --coff-pseudoreloc %p/Inputs/pseudoreloc.exe | FileCheck %s
-RUN: llvm-readobj --coff-pseudoreloc %p/Inputs/nop.exe.coff-x86-64 | FileCheck %s --check-prefix=NOSYM
-RUN: llvm-readobj --coff-pseudoreloc %p/Inputs/trivial.obj.coff-i386 | FileCheck %s --check-prefix=NORELOC
+REQUIRE: x86-registered-target
-CHECK: Format: COFF-i386
-CHECK-NEXT: Arch: i386
-CHECK-NEXT: AddressSize: 32bit
+DEFINE: %{local} = 0x3000
+DEFINE: %{addr1l} = E8
+DEFINE: %{addr3l} = D8
+RUN: yaml2obj %p/Inputs/pseudoreloc.x86_64.yaml | llvm-readobj --coff-pseudoreloc - 2>&1 \
----------------
jh7370 wrote:
I'd prefer to do `yaml2obj ... -o %t` then a separate `llvm-readobj` run command, as it means the intermediate object is left on disk, allowing for post-mortem test debugging.
Also for longer commands, I prefer to split by having the `|` at the end of the previous line, to show that the first line is continued, without needing to look at the next line, then indentation on the next to signify it's a continuation without needing to look at the line before.
https://github.com/llvm/llvm-project/pull/151816
More information about the llvm-commits
mailing list