[llvm] r235285 - [Mips] Support DT_MIPS_OPTIONS dynamic section tag in the llvm-readobj
Simon Atanasyan
simon at atanasyan.com
Sun Apr 19 22:34:48 PDT 2015
Author: atanasyan
Date: Mon Apr 20 00:34:48 2015
New Revision: 235285
URL: http://llvm.org/viewvc/llvm-project?rev=235285&view=rev
Log:
[Mips] Support DT_MIPS_OPTIONS dynamic section tag in the llvm-readobj
Added:
llvm/trunk/test/tools/llvm-readobj/Inputs/mips-options.elf-mips64el (with props)
llvm/trunk/test/tools/llvm-readobj/mips-options.test
Modified:
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Added: llvm/trunk/test/tools/llvm-readobj/Inputs/mips-options.elf-mips64el
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/Inputs/mips-options.elf-mips64el?rev=235285&view=auto
==============================================================================
Binary files llvm/trunk/test/tools/llvm-readobj/Inputs/mips-options.elf-mips64el (added) and llvm/trunk/test/tools/llvm-readobj/Inputs/mips-options.elf-mips64el Mon Apr 20 00:34:48 2015 differ
Propchange: llvm/trunk/test/tools/llvm-readobj/Inputs/mips-options.elf-mips64el
------------------------------------------------------------------------------
svn:executable = *
Added: llvm/trunk/test/tools/llvm-readobj/mips-options.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/mips-options.test?rev=235285&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/mips-options.test (added)
+++ llvm/trunk/test/tools/llvm-readobj/mips-options.test Mon Apr 20 00:34:48 2015
@@ -0,0 +1,22 @@
+# Check DT_MIPS_OPTIONS .dynamic section tag reading
+
+RUN: llvm-readobj -dynamic-table %p/Inputs/mips-options.elf-mips64el | \
+RUN: FileCheck %s
+
+CHECK: DynamicSection [ (14 entries)
+CHECK-NEXT: Tag Type Name/Value
+CHECK-NEXT: 0x0000000000000004 HASH 0x158
+CHECK-NEXT: 0x0000000000000005 STRTAB 0x1C0
+CHECK-NEXT: 0x0000000000000006 SYMTAB 0x178
+CHECK-NEXT: 0x000000000000000A STRSZ 7 (bytes)
+CHECK-NEXT: 0x000000000000000B SYMENT 24 (bytes)
+CHECK-NEXT: 0x0000000070000001 MIPS_RLD_VERSION 1
+CHECK-NEXT: 0x0000000070000005 MIPS_FLAGS NOTPOT
+CHECK-NEXT: 0x0000000070000006 MIPS_BASE_ADDRESS 0x0
+CHECK-NEXT: 0x000000007000000A MIPS_LOCAL_GOTNO 2
+CHECK-NEXT: 0x0000000070000011 MIPS_SYMTABNO 3
+CHECK-NEXT: 0x0000000070000013 MIPS_GOTSYM 0x3
+CHECK-NEXT: 0x0000000000000003 PLTGOT 0x2000
+CHECK-NEXT: 0x0000000070000029 MIPS_OPTIONS 0x1000
+CHECK-NEXT: 0x0000000000000000 NULL 0x0
+CHECK-NEXT: ]
Modified: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=235285&r1=235284&r2=235285&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp Mon Apr 20 00:34:48 2015
@@ -782,6 +782,7 @@ static const char *getTypeString(uint64_
LLVM_READOBJ_TYPE_CASE(MIPS_GOTSYM);
LLVM_READOBJ_TYPE_CASE(MIPS_RLD_MAP);
LLVM_READOBJ_TYPE_CASE(MIPS_PLTGOT);
+ LLVM_READOBJ_TYPE_CASE(MIPS_OPTIONS);
default: return "unknown";
}
}
@@ -873,6 +874,7 @@ static void printValue(const ELFFile<ELF
case DT_MIPS_GOTSYM:
case DT_MIPS_RLD_MAP:
case DT_MIPS_PLTGOT:
+ case DT_MIPS_OPTIONS:
OS << format("0x%" PRIX64, Value);
break;
case DT_RELCOUNT:
More information about the llvm-commits
mailing list