[all-commits] [llvm/llvm-project] 301cb9: [llvm-readobj] - Remove an excessive helper for pr...
Georgii Rymar via All-commits
all-commits at lists.llvm.org
Tue Dec 24 00:56:34 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 301cb91428eed651eeb1c3c0f11eed2e4f78f5f0
https://github.com/llvm/llvm-project/commit/301cb91428eed651eeb1c3c0f11eed2e4f78f5f0
Author: Georgii Rymar <grimar at accesssoftek.com>
Date: 2019-12-24 (Tue, 24 Dec 2019)
Changed paths:
M llvm/lib/Object/ELF.cpp
M llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
M llvm/tools/llvm-readobj/ELFDumper.cpp
Log Message:
-----------
[llvm-readobj] - Remove an excessive helper for printing dynamic tags.
This removes the `getTypeString` from readeobj source because it
almost duplicates the existent method: `ELFFile<ELFT>::getDynamicTagAsString`.
Side effect: now it prints "<unknown:>0xHEXVALUE" instead of "(unknown)" for unknown values.
llvm-readelf before this patch printed:
```
0x0000000012345678 (unknown) 0x8765432187654321
0x000000006abcdef0 (unknown) 0x9988776655443322
0x0000000076543210 (unknown) 0x5555666677778888
```
and now it prints:
```
0x0000000012345678 (<unknown:>0x12345678) 0x8765432187654321
0x000000006abcdef0 (<unknown:>0x6abcdef0) 0x9988776655443322
0x0000000076543210 (<unknown:>0x76543210) 0x5555666677778888
```
GNU reaedlf prints different thing:
```
0x0000000012345678 (<unknown>: 12345678) 0x8765432187654321
0x000000006abcdef0 (Operating System specific: 6abcdef0) 0x9988776655443322
0x0000000076543210 (Processor Specific: 76543210) 0x5555666677778888
```
I am not sure we want to follow GNU here. Even if we do, it should be separate
patch probably. The new output looks better and closer to GNU anyways,
and the code is a bit simpler.
Differential revision: https://reviews.llvm.org/D71835
More information about the All-commits
mailing list