[PATCH] D62256: [llvm-readobj] Implement GNU-style output for dynamic table

Simon Atanasyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 08:10:27 PDT 2019


atanasyan created this revision.
atanasyan added reviewers: jhenderson, rupprecht, jakehehrlich, MaskRay.
Herald added subscribers: kbarton, arichardson, nemanjai, emaste, srhines.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

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
    ...


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62256

Files:
  lld/test/ELF/ppc64-dynamic-relocations.s
  llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test
  llvm/test/tools/llvm-readobj/elf-dynamic-table-dtnull.s
  llvm/test/tools/llvm-readobj/elf-dynamic-tags-machine-specific.test
  llvm/test/tools/llvm-readobj/elf-dynamic-tags.test
  llvm/test/tools/llvm-readobj/elf-versioninfo.test
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62256.200748.patch
Type: text/x-patch
Size: 31611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190522/1c99684b/attachment.bin>


More information about the llvm-commits mailing list