[PATCH] D71835: [llvm-readobj] - Remove an excessive helper for printing dynamic tags.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 02:25:27 PST 2020


jhenderson added a comment.

In D71835#1816484 <https://reviews.llvm.org/D71835#1816484>, @grimar wrote:

> The benefit I see is that we do not need to care about printing "Operating System specific" or "Processor Specific" text
>  and doing actions to align columns after that. I.e. code that prints "<unknown:>" is just a bit simpler.
>  It is not clear how much useful to say that unknown value is "Operating System specific" or "Processor Specific".
>  (I am OK to copy GNU's behavior here if we decide we want it, though)


As someone who works in a system with a lot of one or other of the OS/Processory specific tags, I would much rather see OS/Proc-specific than Unknown for those cases.

>> The only thing I can think of is the lack of '0x' potentially making the value confusing, but the value is actually listed in the first column anyway, so that point isn't exactly an issue.
> 
> I think having "0x" prefix for hex values in the output is always(?) a good thing. I think it is a GNU output bug and we probably should not be bug-compatible with GNU here.

I don't dispute having an 0x prefix is a good thing, but I don't think it's a bug. If you can persuade the GNU guys to change their behaviour, I'd be more than happy to support the 0x being added. However, it's quite common for it not to be present in various GNU tool outputs from my experience.

GNU output style really needs to be compatible with GNU readelf. That was one of my main takeaways having talked to various people at the BoF and round table at last year's Euro LLVM.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71835





More information about the llvm-commits mailing list