[PATCH] D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 15:51:49 PDT 2020


MaskRay added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/RISCV/attribute.s:1
+## Test llvm-readobj & llvm-readelf can decode RISC-V attributes correctly.
+
----------------
This should probably go to `test/MC/RISCV` or `test/MC/ELF/RISCV`. This is more about a test for assembly.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/RISCV/invalid-attr-section-size.test:1
+## This test case is used to ensure the error message is caught by llvm-readobj.
+
----------------
We can have one single `invalid-*.text`. You can find plent of `--docnum=` examples in llvm-readobj/ELF/

As I mentioned, we don't need many tests testing invalid section contents. We just need to show llvm-readobj forwards RISCVAttributeParser diagnostics, which are already tested by llvm/unittests/


================
Comment at: llvm/test/tools/llvm-readobj/ELF/RISCV/validate-attr-section.test:1
+## We only implement attribute section printing for little-endian encoding.
+
----------------
This can be merged into `section-types.test`, I think.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75833





More information about the llvm-commits mailing list