[PATCH] D59089: [llvm-readobj] Dump DT_USED value as string like GNU readelf does
Xing via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 7 06:52:22 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL355600: [llvm-readobj] Dump DT_USED value as string like GNU readelf does (authored by Higuoxing, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59089/new/
https://reviews.llvm.org/D59089
Files:
llvm/trunk/test/tools/llvm-readobj/elf-dynamic-tags.test
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Index: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
===================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
@@ -1876,6 +1876,9 @@
case DT_AUXILIARY:
printLibrary(OS, "Auxiliary library", getDynamicString(Value));
break;
+ case DT_USED:
+ printLibrary(OS, "Not needed object", getDynamicString(Value));
+ break;
case DT_FILTER:
printLibrary(OS, "Filter library", getDynamicString(Value));
break;
Index: llvm/trunk/test/tools/llvm-readobj/elf-dynamic-tags.test
===================================================================
--- llvm/trunk/test/tools/llvm-readobj/elf-dynamic-tags.test
+++ llvm/trunk/test/tools/llvm-readobj/elf-dynamic-tags.test
@@ -3,7 +3,7 @@
# RUN: llvm-readobj --dynamic-table %t | FileCheck %s --check-prefix=LLVM
# RUN: llvm-readelf --dynamic-table %t | FileCheck %s --check-prefix=GNU
-# LLVM: DynamicSection [ (60 entries)
+# LLVM: DynamicSection [ (61 entries)
# LLVM-NEXT: Tag Type Name/Value
# LLVM-NEXT: 0x0000000000000001 NEEDED Shared library: [D]
# LLVM-NEXT: 0x0000000000000002 PLTRELSZ 16 (bytes)
@@ -60,6 +60,7 @@
# LLVM-NEXT: 0x000000006FFFFFFE VERNEED 0x1000
# LLVM-NEXT: 0x000000006FFFFFFF VERNEEDNUM 0
# LLVM-NEXT: 0x000000007FFFFFFD AUXILIARY Auxiliary library: [D]
+# LLVM-NEXT: 0x000000007FFFFFFE USED Not needed object: [U]
# LLVM-NEXT: 0x000000007FFFFFFF FILTER Filter library: [U]
# LLVM-NEXT: 0x0000000012345678 unknown 0x8765432187654321
# LLVM-NEXT: 0x000000006ABCDEF0 unknown 0x9988776655443322
@@ -67,7 +68,7 @@
# LLVM-NEXT: 0x0000000000000000 NULL 0x0
# LLVM-NEXT: ]
-# GNU: DynamicSection [ (60 entries)
+# GNU: DynamicSection [ (61 entries)
# GNU-NEXT: Tag Type Name/Value
# GNU-NEXT: 0x0000000000000001 NEEDED Shared library: [D]
# GNU-NEXT: 0x0000000000000002 PLTRELSZ 16 (bytes)
@@ -124,6 +125,7 @@
# GNU-NEXT: 0x000000006ffffffe VERNEED 0x1000
# GNU-NEXT: 0x000000006fffffff VERNEEDNUM 0
# GNU-NEXT: 0x000000007ffffffd AUXILIARY Auxiliary library: [D]
+# GNU-NEXT: 0x000000007ffffffe USED Not needed object: [U]
# GNU-NEXT: 0x000000007fffffff FILTER Filter library: [U]
# GNU-NEXT: 0x0000000012345678 unknown 0x8765432187654321
# GNU-NEXT: 0x000000006abcdef0 unknown 0x9988776655443322
@@ -257,6 +259,8 @@
Value: 0x0
- Tag: DT_AUXILIARY
Value: 0x1
+ - Tag: DT_USED
+ Value: 0x3
- Tag: DT_FILTER
Value: 0x3
# Show behaviour for unknown values in special and un-marked ranges.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59089.189708.patch
Type: text/x-patch
Size: 2939 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190307/4bbe6c6f/attachment.bin>
More information about the llvm-commits
mailing list