[PATCH] D78920: [llvm-readobj] [COFF] Cope with debug directory payloads in unmapped areas

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 03:43:32 PDT 2020


mstorsjo marked an inline comment as done.
mstorsjo added a comment.

In D78920#2007188 <https://reviews.llvm.org/D78920#2007188>, @jhenderson wrote:

> What happens currently without this change? I'm guessing it tries to read something bad?


Not really, the `getDebugPDBInfo` and `getRvaAndSizeAsBytes` methods do fail cleanly, but the llvm-readobj call errors out at that point without printing info for the rest of the file.

> FWIW, ELF's yaml2obj now has the ability to add data blocks to an ELF, without generating a section header. See the "Fill" section type. Perhaps that's something that could be implemented in COFF's version at some point?

That sounds potentially useful - if someone wants to spend more time on this cornercase.



================
Comment at: llvm/test/tools/llvm-readobj/COFF/debug-directory-unmapped.test:1
+# RUN: yaml2obj %s -o %t.exe
+
----------------
jhenderson wrote:
> It might be worth a comment at the start of this test explaining what exactly is being tested, as it's not particularly obvious to me just looking at the test.
Good point, I can do that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78920/new/

https://reviews.llvm.org/D78920





More information about the llvm-commits mailing list