[lld] r361633 - [llvm-readobj] Implement GNU-style output for dynamic table

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Fri May 24 05:22:53 PDT 2019


Author: atanasyan
Date: Fri May 24 05:22:53 2019
New Revision: 361633

URL: http://llvm.org/viewvc/llvm-project?rev=361633&view=rev
Log:
[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

Modified:
    lld/trunk/test/ELF/ppc64-dynamic-relocations.s

Modified: lld/trunk/test/ELF/ppc64-dynamic-relocations.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/ppc64-dynamic-relocations.s?rev=361633&r1=361632&r2=361633&view=diff
==============================================================================
--- lld/trunk/test/ELF/ppc64-dynamic-relocations.s (original)
+++ lld/trunk/test/ELF/ppc64-dynamic-relocations.s Fri May 24 05:22:53 2019
@@ -29,7 +29,7 @@
 // DIS:     .plt       00000018  0000000010030000 BSS
 
 // DT_PLTGOT should point to the start of the .plt section.
-// DT: 0x0000000000000003 PLTGOT               0x10030000
+// DT: 0x0000000000000003 (PLTGOT)             0x10030000
 
     .text
     .abiversion 2




More information about the llvm-commits mailing list