[PATCH] D140555: [lld][COFF]llvm-readobj COFFDumper print PEHeader CheckSum
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 29 02:35:39 PST 2022
mstorsjo added inline comments.
================
Comment at: lld/test/COFF/hello32.test:45
HEADER-NEXT: SizeOfHeaders: 1024
+HEADER-NEXT: CheckSum:
HEADER-NEXT: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)
----------------
thieta wrote:
> Why is this line empty here and `0x0` below? Does this mean that the header isn't there?
>
> I think I like it to either NOT be included if the header is missing or just 0x0 so it's a bit consistent in the output. Can't see any other field just being a empty line.
Leaving out the value can be a common practice for tests, when you want to span all lines with `<CHECK>-NEXT` lines, but you don't want to literally check all the contents of those lines - i.e. any checksum value (zero or nonzero) would be fine.
But for the purposes of this particular test, I guess the value should always be zero so spelling out the `CheckSum: 0x0` probably is fine too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140555/new/
https://reviews.llvm.org/D140555
More information about the llvm-commits
mailing list