[PATCH] D128705: [llvm-objdump] Create fake sections for a ELF core file

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 10:49:02 PDT 2022


MaskRay added a comment.

In D128705#3619651 <https://reviews.llvm.org/D128705#3619651>, @namhyung wrote:

>> This needs a test. I suggest llvm/test/tools/llvm-objdump/X86/disassemble-no-section.test.
>
> Yes, I'd like to add a test but it requires a specific binary file (ET_CORE extracted by perf tools).  I'm seeing that most of the test uses a text input.  Could you please provide an example how to use a binary file in the test?

We generally avoid precanned binary. (Difficult to update, difficult to read, contains too many details which are unneeded for testing purposes).

Most tests are created from yaml using yaml2obj. Run `ninja obj2yaml`. You can use `obj2yaml bin` to get a yaml from a binary, then manually scrub it to have just the needed details.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128705



More information about the llvm-commits mailing list