[llvm] r243833 - [Mips] Support DT_MIPS_RLD_MAP_REL dynamic section tag in the llvm-readobj
Simon Atanasyan
simon at atanasyan.com
Sat Aug 1 05:02:03 PDT 2015
Author: atanasyan
Date: Sat Aug 1 07:02:02 2015
New Revision: 243833
URL: http://llvm.org/viewvc/llvm-project?rev=243833&view=rev
Log:
[Mips] Support DT_MIPS_RLD_MAP_REL dynamic section tag in the llvm-readobj
Added:
llvm/trunk/test/tools/llvm-readobj/Inputs/mips-rld-map-rel.elf-mipsel (with props)
llvm/trunk/test/tools/llvm-readobj/mips-rld-map-rel.test
Modified:
llvm/trunk/include/llvm/Support/ELF.h
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Modified: llvm/trunk/include/llvm/Support/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ELF.h?rev=243833&r1=243832&r2=243833&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/ELF.h (original)
+++ llvm/trunk/include/llvm/Support/ELF.h Sat Aug 1 07:02:02 2015
@@ -1139,8 +1139,10 @@ enum {
DT_MIPS_GP_VALUE = 0x70000030, // GP value for auxiliary GOTs.
DT_MIPS_AUX_DYNAMIC = 0x70000031, // Address of auxiliary .dynamic.
DT_MIPS_PLTGOT = 0x70000032, // Address of the base of the PLTGOT.
- DT_MIPS_RWPLT = 0x70000034 // Points to the base
+ DT_MIPS_RWPLT = 0x70000034, // Points to the base
// of a writable PLT.
+ DT_MIPS_RLD_MAP_REL = 0x70000035 // Relative offset of run time loader
+ // map, used for debugging.
};
// DT_FLAGS values.
Added: llvm/trunk/test/tools/llvm-readobj/Inputs/mips-rld-map-rel.elf-mipsel
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/Inputs/mips-rld-map-rel.elf-mipsel?rev=243833&view=auto
==============================================================================
Binary files llvm/trunk/test/tools/llvm-readobj/Inputs/mips-rld-map-rel.elf-mipsel (added) and llvm/trunk/test/tools/llvm-readobj/Inputs/mips-rld-map-rel.elf-mipsel Sat Aug 1 07:02:02 2015 differ
Propchange: llvm/trunk/test/tools/llvm-readobj/Inputs/mips-rld-map-rel.elf-mipsel
------------------------------------------------------------------------------
svn:executable = *
Added: llvm/trunk/test/tools/llvm-readobj/mips-rld-map-rel.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/mips-rld-map-rel.test?rev=243833&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/mips-rld-map-rel.test (added)
+++ llvm/trunk/test/tools/llvm-readobj/mips-rld-map-rel.test Sat Aug 1 07:02:02 2015
@@ -0,0 +1,24 @@
+# Check DT_MIPS_RLD_MAP_REL .dynamic section tag reading
+
+RUN: llvm-readobj -dynamic-table %p/Inputs/mips-rld-map-rel.elf-mipsel | \
+RUN: FileCheck %s
+
+CHECK: DynamicSection [ (16 entries)
+CHECK-NEXT: Tag Type Name/Value
+CHECK-NEXT: 0x00000004 HASH 0x220
+CHECK-NEXT: 0x00000005 STRTAB 0x2FC
+CHECK-NEXT: 0x00000006 SYMTAB 0x25C
+CHECK-NEXT: 0x0000000A STRSZ 72 (bytes)
+CHECK-NEXT: 0x0000000B SYMENT 16 (bytes)
+CHECK-NEXT: 0x70000035 MIPS_RLD_MAP_REL 0x101E0
+CHECK-NEXT: 0x00000015 DEBUG 0x0
+CHECK-NEXT: 0x00000003 PLTGOT 0x10390
+CHECK-NEXT: 0x70000001 MIPS_RLD_VERSION 1
+CHECK-NEXT: 0x70000005 MIPS_FLAGS NOTPOT
+CHECK-NEXT: 0x70000006 MIPS_BASE_ADDRESS 0x0
+CHECK-NEXT: 0x7000000A MIPS_LOCAL_GOTNO 2
+CHECK-NEXT: 0x70000011 MIPS_SYMTABNO 10
+CHECK-NEXT: 0x70000012 MIPS_UNREFEXTNO 15
+CHECK-NEXT: 0x70000013 MIPS_GOTSYM 0xA
+CHECK-NEXT: 0x00000000 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=243833&r1=243832&r2=243833&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp Sat Aug 1 07:02:02 2015
@@ -1005,6 +1005,7 @@ static const char *getTypeString(uint64_
LLVM_READOBJ_TYPE_CASE(RELCOUNT);
LLVM_READOBJ_TYPE_CASE(GNU_HASH);
LLVM_READOBJ_TYPE_CASE(MIPS_RLD_VERSION);
+ LLVM_READOBJ_TYPE_CASE(MIPS_RLD_MAP_REL);
LLVM_READOBJ_TYPE_CASE(MIPS_FLAGS);
LLVM_READOBJ_TYPE_CASE(MIPS_BASE_ADDRESS);
LLVM_READOBJ_TYPE_CASE(MIPS_LOCAL_GOTNO);
@@ -1139,6 +1140,7 @@ void ELFDumper<ELFT>::printValue(uint64_
case DT_MIPS_BASE_ADDRESS:
case DT_MIPS_GOTSYM:
case DT_MIPS_RLD_MAP:
+ case DT_MIPS_RLD_MAP_REL:
case DT_MIPS_PLTGOT:
case DT_MIPS_OPTIONS:
OS << format("0x%" PRIX64, Value);
More information about the llvm-commits
mailing list