OSDN Git Service

[llvm-readobj] Implement GNU-style output for dynamic table
authorSimon Atanasyan <simon@atanasyan.com>
Fri, 24 May 2019 12:22:53 +0000 (12:22 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Fri, 24 May 2019 12:22:53 +0000 (12:22 +0000)
commit7042da09b94ed34e213347c5c9423c9b3f5a3118
tree6a90ab1443c1f04ace69db09540a54a9d5704e49
parentc60409f1215e028ee063d7459240f5eb588c415c
[llvm-readobj] Implement GNU-style output for dynamic table

GNU readelf tool prints slightly different dynamic table "header" and
surrounds dynamic tag names by brackets. This patch implements the same
formatting for GNU-style output of the `llvm-readobj`.

LLVM
```
DynamicSection [ (13 entries)
  Tag        Type                 Name/Value
  0x00000006 SYMTAB               0x168
  ...
]
```

GNU
```
Dynamic section at offset 0x1d0 contains 13 entries:
  Tag        Type                 Name/Value
  0x00000006 (SYMTAB)             0x168
  ...
```

Differential Revision: https://reviews.llvm.org/D62256

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361633 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-readobj/dynamic.test
test/tools/llvm-readobj/elf-dynamic-malformed.test
test/tools/llvm-readobj/elf-dynamic-not-in-pt-dynamic.test
test/tools/llvm-readobj/elf-dynamic-table-dtnull.s
test/tools/llvm-readobj/elf-dynamic-tags-machine-specific.test
test/tools/llvm-readobj/elf-dynamic-tags.test
test/tools/llvm-readobj/elf-non-dynamic-in-pt-dynamic.test
test/tools/llvm-readobj/elf-versioninfo.test
tools/llvm-readobj/ELFDumper.cpp