[llvm-readelf] --notes: move 'Data size' column left by 1
readelf -n:
```
// "Data size" is not left justified
Owner Data size Description
GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
```
llvm-readelf -n (before):
```
// "Data size" column shifted by 1
Owner Data size Description
GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
```
llvm-readelf -n (after):
```
Owner Data size Description
GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
```
This change is made to reduce the diff with readelf -n, so that it is
slightly easier to check what features readelf implements but we don't.
Reviewed By: grimar, jhenderson
Differential Revision: https://reviews.llvm.org/D65847
llvm-svn: 368138
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp
index 0e81958..3a68245 100644
--- a/llvm/tools/llvm-readobj/ELFDumper.cpp
+++ b/llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -4315,7 +4315,7 @@
const typename ELFT::Addr Size) {
OS << "Displaying notes found at file offset " << format_hex(Offset, 10)
<< " with length " << format_hex(Size, 10) << ":\n"
- << " Owner Data size\tDescription\n";
+ << " Owner Data size \tDescription\n";
};
auto ProcessNote = [&](const Elf_Note &Note) {
@@ -4323,7 +4323,7 @@
ArrayRef<uint8_t> Descriptor = Note.getDesc();
Elf_Word Type = Note.getType();
- OS << " " << Name << std::string(22 - Name.size(), ' ')
+ OS << " " << left_justify(Name, 20) << ' '
<< format_hex(Descriptor.size(), 10) << '\t';
if (Name == "GNU") {