[PATCH] D48281: [llvm-readobj] Add -hex-dump (-x) option

Paul Semel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 4 03:08:39 PDT 2018


paulsemel added a comment.

In https://reviews.llvm.org/D48281#1150535, @paulsemel wrote:

> In https://reviews.llvm.org/D48281#1150111, @dblaikie wrote:
>
> > Perhaps generalized further still - if every format has the ability to retrieve a section by name or by index and return a generic llvm::object::SectionRef - then the code can be written in general over that, query the SectionRef for the name and contents, etc?
>
>
> Well, I thought about it, but the problem is that the interface are a bit different.. I tried to change the interface COFF (which is the only one that needs changes), but it would break too much things if I do so..


Just to add one more argument to this. I think that getting the sections by Index/Name is not implemented as virtual method in `ObjectFile`. Thus, we might better do this way not to get confused on what can (for the moment) be generic and what can't be.
So what do you think ?


Repository:
  rL LLVM

https://reviews.llvm.org/D48281





More information about the llvm-commits mailing list