[PATCH] D89691: [obj2yaml] - Add support of dumping archives.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 01:59:05 PDT 2020
grimar added a comment.
In D89691#2341153 <https://reviews.llvm.org/D89691#2341153>, @jhenderson wrote:
> Honestly, I'm not convinced that just because we can, we should. There are good reasons for other tools like llvm-readelf to run over all archive members, but obj2yaml isn't, to my knowledge, used in a production environment or even in a testing environment where such functionality would prove particularly useful. Increasing code complexity in order to support it seems unwise to me.
OK.
In D89691#2341153 <https://reviews.llvm.org/D89691#2341153>, @jhenderson wrote:
> I actually think there might be a slightly different approach to this, for which there might be a use-case: rather than dumping individual YAML blocks, add them all as "children" for an archive YAML block. That way, you can also see the non-binary members of the archive, e.g. the symbol table and the string table. This is probably more useful for the yaml2obj side, to allow testing of malformed archives in llvm-ar testing.
I thought about it (as an independent feature/option though) too. It could be useful for tests like https://github.com/llvm/llvm-project/blob/master/llvm/test/tools/llvm-objdump/malformed-archives.test,
which is currently has 14 precompiled broken archives, which are a bit hard to invesigate (at least for me it was, when I tried to craft a last test case for this patch).
I've even started to dig into format details of archives. Going to invesigate how to implement it for yaml2obj/obj2yaml.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89691/new/
https://reviews.llvm.org/D89691
More information about the llvm-commits
mailing list