[llvm] r250464 - [llvm-readobj/ELF] Dump DT_VERDEF/DT_VERDEFNUM correctly.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 15 15:04:56 PDT 2015
Author: davide
Date: Thu Oct 15 17:04:55 2015
New Revision: 250464
URL: http://llvm.org/viewvc/llvm-project?rev=250464&view=rev
Log:
[llvm-readobj/ELF] Dump DT_VERDEF/DT_VERDEFNUM correctly.
Added:
llvm/trunk/test/tools/llvm-readobj/Inputs/verdef.elf-x86-64 (with props)
llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test
Modified:
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Added: llvm/trunk/test/tools/llvm-readobj/Inputs/verdef.elf-x86-64
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/Inputs/verdef.elf-x86-64?rev=250464&view=auto
==============================================================================
Binary file - no diff available.
Propchange: llvm/trunk/test/tools/llvm-readobj/Inputs/verdef.elf-x86-64
------------------------------------------------------------------------------
svn:executable = *
Propchange: llvm/trunk/test/tools/llvm-readobj/Inputs/verdef.elf-x86-64
------------------------------------------------------------------------------
svn:mime-type = application/x-sharedlib
Added: llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test?rev=250464&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test (added)
+++ llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test Thu Oct 15 17:04:55 2015
@@ -0,0 +1,7 @@
+// Test that llvm-readobj dumps version info tags correctly.
+
+RUN: llvm-readobj -dynamic-table %p/Inputs/verdef.elf-x86-64 | FileCheck %s
+
+CHECK: 0x000000006FFFFFF0 VERSYM 0x24C
+CHECK: 0x000000006FFFFFFC VERDEF 0x25C
+CHECK: 0x000000006FFFFFFD VERDEFNUM 3
Modified: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=250464&r1=250463&r2=250464&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp Thu Oct 15 17:04:55 2015
@@ -1244,6 +1244,8 @@ static const char *getTypeString(uint64_
LLVM_READOBJ_TYPE_CASE(SYMENT);
LLVM_READOBJ_TYPE_CASE(SYMTAB);
LLVM_READOBJ_TYPE_CASE(TEXTREL);
+ LLVM_READOBJ_TYPE_CASE(VERDEF);
+ LLVM_READOBJ_TYPE_CASE(VERDEFNUM);
LLVM_READOBJ_TYPE_CASE(VERNEED);
LLVM_READOBJ_TYPE_CASE(VERNEEDNUM);
LLVM_READOBJ_TYPE_CASE(VERSYM);
@@ -1378,6 +1380,7 @@ void ELFDumper<ELFT>::printValue(uint64_
case DT_FINI_ARRAY:
case DT_PREINIT_ARRAY:
case DT_DEBUG:
+ case DT_VERDEF:
case DT_VERNEED:
case DT_VERSYM:
case DT_GNU_HASH:
@@ -1391,6 +1394,7 @@ void ELFDumper<ELFT>::printValue(uint64_
OS << format("0x%" PRIX64, Value);
break;
case DT_RELCOUNT:
+ case DT_VERDEFNUM:
case DT_VERNEEDNUM:
case DT_MIPS_RLD_VERSION:
case DT_MIPS_LOCAL_GOTNO:
More information about the llvm-commits
mailing list