[llvm] e1f524e - [llvm-readobj][llvm-readelf][test] - Add a few more dynamic section tests.
Georgii Rymar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 06:09:28 PST 2020
Author: Georgii Rymar
Date: 2020-01-14T17:09:12+03:00
New Revision: e1f524ea43f920767259c47e201405091d7e76fd
URL: https://github.com/llvm/llvm-project/commit/e1f524ea43f920767259c47e201405091d7e76fd
DIFF: https://github.com/llvm/llvm-project/commit/e1f524ea43f920767259c47e201405091d7e76fd.diff
LOG: [llvm-readobj][llvm-readelf][test] - Add a few more dynamic section tests.
This adds a few more tests for dynamic section.
We only had tests for simple unknown values for 64-bits target,
in this patch I've added OS specific and processor specific tags.
Also it tests both 32 and 64-bits targets now.
It will help to fix the formatting issues we have and diagnose a possible new ones.
Differential revision: https://reviews.llvm.org/D71896
Added:
Modified:
llvm/test/tools/llvm-objdump/elf-dynamic-section.test
llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-objdump/elf-dynamic-section.test b/llvm/test/tools/llvm-objdump/elf-dynamic-section.test
index a401c3881c9c..05f21f6072ab 100644
--- a/llvm/test/tools/llvm-objdump/elf-dynamic-section.test
+++ b/llvm/test/tools/llvm-objdump/elf-dynamic-section.test
@@ -1,64 +1,67 @@
-# RUN: yaml2obj %s > %t
-# RUN: llvm-objdump -p %t | FileCheck %s
+# RUN: yaml2obj --docnum=1 %s -o %t1
+# RUN: llvm-objdump -p %t1 | FileCheck %s --strict-whitespace --match-full-lines --check-prefix=ELF64
-# CHECK:Dynamic Section:
-# CHECK-NEXT: NEEDED D
-# CHECK-NEXT: PLTRELSZ 0x0000000000000010
-# CHECK-NEXT: PLTGOT 0x0000000000001000
-# CHECK-NEXT: HASH 0x0000000000001000
-# CHECK-NEXT: STRTAB 0x0000000000001000
-# CHECK-NEXT: SYMTAB 0x0000000000001000
-# CHECK-NEXT: RELA 0x0000000000001000
-# CHECK-NEXT: RELASZ 0x0000000000000010
-# CHECK-NEXT: RELAENT 0x0000000000000789
-# CHECK-NEXT: STRSZ 0x0000000000000010
-# CHECK-NEXT: SYMENT 0x0000000000000987
-# CHECK-NEXT: INIT 0x0000000000001000
-# CHECK-NEXT: FINI 0x0000000000001000
-# CHECK-NEXT: SONAME U
-# CHECK-NEXT: RPATH f
-# CHECK-NEXT: SYMBOLIC 0x1234567890abcdef
-# CHECK-NEXT: REL 0x0000000000001000
-# CHECK-NEXT: RELSZ 0x0000000000000010
-# CHECK-NEXT: RELENT 0x0000000000000123
-# CHECK-NEXT: PLTREL 0x0000000000000007
-# CHECK-NEXT: DEBUG 0xfedcba0987654321
-# CHECK-NEXT: TEXTREL 0x1122334455667788
-# CHECK-NEXT: JMPREL 0x0000000000001000
-# CHECK-NEXT: BIND_NOW 0x8877665544332211
-# CHECK-NEXT: INIT_ARRAY 0x0000000000001000
-# CHECK-NEXT: FINI_ARRAY 0x0000000000001000
-# CHECK-NEXT: INIT_ARRAYSZ 0x0000000000000010
-# CHECK-NEXT: FINI_ARRAYSZ 0x0000000000000010
-# CHECK-NEXT: RUNPATH w
-# CHECK-NEXT: FLAGS 0xaabbccddeeff9900
-# CHECK-NEXT: PREINIT_ARRAY 0x0000000000001000
-# CHECK-NEXT: PREINIT_ARRAYSZ 0x0000000000000010
-# CHECK-NEXT: SYMTAB_SHNDX 0x0000000000001000
-# CHECK-NEXT: RELRSZ 0x0000000000000010
-# CHECK-NEXT: RELR 0x0000000000001000
-# CHECK-NEXT: RELRENT 0x0000000000004321
-# CHECK-NEXT: ANDROID_REL 0x0000000000001000
-# CHECK-NEXT: ANDROID_RELSZ 0x0000000000000010
-# CHECK-NEXT: ANDROID_RELA 0x0000000000001000
-# CHECK-NEXT: ANDROID_RELASZ 0x0000000000000010
-# CHECK-NEXT: ANDROID_RELR 0x0000000000001000
-# CHECK-NEXT: ANDROID_RELRSZ 0x0000000000000010
-# CHECK-NEXT: ANDROID_RELRENT 0x0000000000001234
-# CHECK-NEXT: GNU_HASH 0x0000000000001000
-# CHECK-NEXT: TLSDESC_PLT 0x0000000000001000
-# CHECK-NEXT: TLSDESC_GOT 0x0000000000001000
-# CHECK-NEXT: RELACOUNT 0x0000000000000000
-# CHECK-NEXT: RELCOUNT 0x0000000000000000
-# CHECK-NEXT: FLAGS_1 0x0000000087654321
-# CHECK-NEXT: VERSYM 0x0000000000001000
-# CHECK-NEXT: VERDEF 0x0000000000001000
-# CHECK-NEXT: VERDEFNUM 0x0000000000000000
-# CHECK-NEXT: VERNEED 0x0000000000001000
-# CHECK-NEXT: VERNEEDNUM 0x0000000000000000
-# CHECK-NEXT: AUXILIARY D
-# CHECK-NEXT: FILTER U
-# CHECK-NEXT: <unknown:>0x1234abcd 0x0000000000000001
+# ELF64:Dynamic Section:
+# ELF64-NEXT: NEEDED D
+# ELF64-NEXT: PLTRELSZ 0x0000000000000010
+# ELF64-NEXT: PLTGOT 0x0000000000001000
+# ELF64-NEXT: HASH 0x0000000000001000
+# ELF64-NEXT: STRTAB 0x0000000000001000
+# ELF64-NEXT: SYMTAB 0x0000000000001000
+# ELF64-NEXT: RELA 0x0000000000001000
+# ELF64-NEXT: RELASZ 0x0000000000000010
+# ELF64-NEXT: RELAENT 0x0000000000000789
+# ELF64-NEXT: STRSZ 0x0000000000000010
+# ELF64-NEXT: SYMENT 0x0000000000000987
+# ELF64-NEXT: INIT 0x0000000000001000
+# ELF64-NEXT: FINI 0x0000000000001000
+# ELF64-NEXT: SONAME U
+# ELF64-NEXT: RPATH f
+# ELF64-NEXT: SYMBOLIC 0x1234567890abcdef
+# ELF64-NEXT: REL 0x0000000000001000
+# ELF64-NEXT: RELSZ 0x0000000000000010
+# ELF64-NEXT: RELENT 0x0000000000000123
+# ELF64-NEXT: PLTREL 0x0000000000000007
+# ELF64-NEXT: DEBUG 0xfedcba0987654321
+# ELF64-NEXT: TEXTREL 0x1122334455667788
+# ELF64-NEXT: JMPREL 0x0000000000001000
+# ELF64-NEXT: BIND_NOW 0x8877665544332211
+# ELF64-NEXT: INIT_ARRAY 0x0000000000001000
+# ELF64-NEXT: FINI_ARRAY 0x0000000000001000
+# ELF64-NEXT: INIT_ARRAYSZ 0x0000000000000010
+# ELF64-NEXT: FINI_ARRAYSZ 0x0000000000000010
+# ELF64-NEXT: RUNPATH w
+# ELF64-NEXT: FLAGS 0xaabbccddeeff9900
+# ELF64-NEXT: PREINIT_ARRAY 0x0000000000001000
+# ELF64-NEXT: PREINIT_ARRAYSZ 0x0000000000000010
+# ELF64-NEXT: SYMTAB_SHNDX 0x0000000000001000
+# ELF64-NEXT: RELRSZ 0x0000000000000010
+# ELF64-NEXT: RELR 0x0000000000001000
+# ELF64-NEXT: RELRENT 0x0000000000004321
+# ELF64-NEXT: ANDROID_REL 0x0000000000001000
+# ELF64-NEXT: ANDROID_RELSZ 0x0000000000000010
+# ELF64-NEXT: ANDROID_RELA 0x0000000000001000
+# ELF64-NEXT: ANDROID_RELASZ 0x0000000000000010
+# ELF64-NEXT: ANDROID_RELR 0x0000000000001000
+# ELF64-NEXT: ANDROID_RELRSZ 0x0000000000000010
+# ELF64-NEXT: ANDROID_RELRENT 0x0000000000001234
+# ELF64-NEXT: GNU_HASH 0x0000000000001000
+# ELF64-NEXT: TLSDESC_PLT 0x0000000000001000
+# ELF64-NEXT: TLSDESC_GOT 0x0000000000001000
+# ELF64-NEXT: RELACOUNT 0x0000000000000000
+# ELF64-NEXT: RELCOUNT 0x0000000000000000
+# ELF64-NEXT: FLAGS_1 0x0000000087654321
+# ELF64-NEXT: VERSYM 0x0000000000001000
+# ELF64-NEXT: VERDEF 0x0000000000001000
+# ELF64-NEXT: VERDEFNUM 0x0000000000000000
+# ELF64-NEXT: VERNEED 0x0000000000001000
+# ELF64-NEXT: VERNEEDNUM 0x0000000000000000
+# ELF64-NEXT: AUXILIARY D
+# ELF64-NEXT: FILTER U
+# ELF64-NEXT: <unknown:>0x12345678 0x8765432187654321
+# ELF64-NEXT: <unknown:>0x6abcdef0 0x9988776655443322
+# ELF64-NEXT: <unknown:>0x76543210 0x5555666677778888
+# ELF64-NOT:{{.}}
--- !ELF
FileHeader:
@@ -189,8 +192,232 @@ Sections:
Value: 0x1
- Tag: DT_FILTER
Value: 0x3
- - Tag: 0x1234abcd
+## Show behaviour for unknown values in special and unmarked ranges.
+## An arbitrary unknown value outside of the special ranges.
+ - Tag: 0x12345678
+ Value: 0x8765432187654321
+## An OS specific tag.
+ - Tag: 0x6abcdef0
+ Value: 0x9988776655443322
+## A processor specific tags.
+ - Tag: 0x76543210
+ Value: 0x5555666677778888
+ - Tag: DT_NULL
+ Value: 0x0
+ProgramHeaders:
+ - Type: PT_LOAD
+ VAddr: 0x1000
+ Sections:
+ - Section: .dynstr
+ - Section: .dynamic
+ - Type: PT_DYNAMIC
+ VAddr: 0x1010
+ Sections:
+ - Section: .dynamic
+
+# RUN: yaml2obj --docnum=2 %s > %t2
+# RUN: llvm-objdump -p %t2 | FileCheck %s --strict-whitespace --match-full-lines --check-prefix=ELF32
+
+# ELF32:Dynamic Section:
+# ELF32-NEXT: NEEDED D
+# ELF32-NEXT: PLTRELSZ 0x00000010
+# ELF32-NEXT: PLTGOT 0x00001000
+# ELF32-NEXT: HASH 0x00001000
+# ELF32-NEXT: STRTAB 0x00001000
+# ELF32-NEXT: SYMTAB 0x00001000
+# ELF32-NEXT: RELA 0x00001000
+# ELF32-NEXT: RELASZ 0x00000010
+# ELF32-NEXT: RELAENT 0x00000789
+# ELF32-NEXT: STRSZ 0x00000010
+# ELF32-NEXT: SYMENT 0x00000987
+# ELF32-NEXT: INIT 0x00001000
+# ELF32-NEXT: FINI 0x00001000
+# ELF32-NEXT: SONAME U
+# ELF32-NEXT: RPATH f
+# ELF32-NEXT: SYMBOLIC 0x12345678
+# ELF32-NEXT: REL 0x00001000
+# ELF32-NEXT: RELSZ 0x00000010
+# ELF32-NEXT: RELENT 0x00000123
+# ELF32-NEXT: PLTREL 0x00000007
+# ELF32-NEXT: DEBUG 0xfedcba09
+# ELF32-NEXT: TEXTREL 0x11223344
+# ELF32-NEXT: JMPREL 0x00001000
+# ELF32-NEXT: BIND_NOW 0x88776655
+# ELF32-NEXT: INIT_ARRAY 0x00001000
+# ELF32-NEXT: FINI_ARRAY 0x00001000
+# ELF32-NEXT: INIT_ARRAYSZ 0x00000010
+# ELF32-NEXT: FINI_ARRAYSZ 0x00000010
+# ELF32-NEXT: RUNPATH w
+# ELF32-NEXT: FLAGS 0xaabbccdd
+# ELF32-NEXT: PREINIT_ARRAY 0x00001000
+# ELF32-NEXT: PREINIT_ARRAYSZ 0x00000010
+# ELF32-NEXT: SYMTAB_SHNDX 0x00001000
+# ELF32-NEXT: RELRSZ 0x00000010
+# ELF32-NEXT: RELR 0x00001000
+# ELF32-NEXT: RELRENT 0x00004321
+# ELF32-NEXT: ANDROID_REL 0x00001000
+# ELF32-NEXT: ANDROID_RELSZ 0x00000010
+# ELF32-NEXT: ANDROID_RELA 0x00001000
+# ELF32-NEXT: ANDROID_RELASZ 0x00000010
+# ELF32-NEXT: ANDROID_RELR 0x00001000
+# ELF32-NEXT: ANDROID_RELRSZ 0x00000010
+# ELF32-NEXT: ANDROID_RELRENT 0x00001234
+# ELF32-NEXT: GNU_HASH 0x00001000
+# ELF32-NEXT: TLSDESC_PLT 0x00001000
+# ELF32-NEXT: TLSDESC_GOT 0x00001000
+# ELF32-NEXT: RELACOUNT 0x00000000
+# ELF32-NEXT: RELCOUNT 0x00000000
+# ELF32-NEXT: FLAGS_1 0x87654321
+# ELF32-NEXT: VERSYM 0x00001000
+# ELF32-NEXT: VERDEF 0x00001000
+# ELF32-NEXT: VERDEFNUM 0x00000000
+# ELF32-NEXT: VERNEED 0x00001000
+# ELF32-NEXT: VERNEEDNUM 0x00000000
+# ELF32-NEXT: AUXILIARY D
+# ELF32-NEXT: FILTER U
+# ELF32-NEXT: <unknown:>0x12345678 0x87654321
+# ELF32-NEXT: <unknown:>0x6abcdef0 0x99887766
+# ELF32-NEXT: <unknown:>0x76543210 0x55556666
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_386
+Sections:
+ - Name: .dynstr
+ Type: SHT_STRTAB
+ Address: 0x1000
+ Size: 0x10
+ Content: "004400550066007700"
+ - Name: .dynamic
+ Type: SHT_DYNAMIC
+ Address: 0x1010
+ Link: 1
+ Entries:
+ - Tag: DT_NEEDED
Value: 0x1
+ - Tag: DT_PLTRELSZ
+ Value: 0x10
+ - Tag: DT_PLTGOT
+ Value: 0x1000
+ - Tag: DT_HASH
+ Value: 0x1000
+ - Tag: DT_STRTAB
+ Value: 0x1000
+ - Tag: DT_SYMTAB
+ Value: 0x1000
+ - Tag: DT_RELA
+ Value: 0x1000
+ - Tag: DT_RELASZ
+ Value: 0x10
+ - Tag: DT_RELAENT
+ Value: 0x789
+ - Tag: DT_STRSZ
+ Value: 0x10
+ - Tag: DT_SYMENT
+ Value: 0x987
+ - Tag: DT_INIT
+ Value: 0x1000
+ - Tag: DT_FINI
+ Value: 0x1000
+ - Tag: DT_SONAME
+ Value: 0x3
+ - Tag: DT_RPATH
+ Value: 0x5
+ - Tag: DT_SYMBOLIC
+ Value: 0x12345678
+ - Tag: DT_REL
+ Value: 0x1000
+ - Tag: DT_RELSZ
+ Value: 0x10
+ - Tag: DT_RELENT
+ Value: 0x123
+ - Tag: DT_PLTREL
+ Value: 0x7
+ - Tag: DT_DEBUG
+ Value: 0xfedcba09
+ - Tag: DT_TEXTREL
+ Value: 0x11223344
+ - Tag: DT_JMPREL
+ Value: 0x1000
+ - Tag: DT_BIND_NOW
+ Value: 0x88776655
+ - Tag: DT_INIT_ARRAY
+ Value: 0x1000
+ - Tag: DT_FINI_ARRAY
+ Value: 0x1000
+ - Tag: DT_INIT_ARRAYSZ
+ Value: 0x10
+ - Tag: DT_FINI_ARRAYSZ
+ Value: 0x10
+ - Tag: DT_RUNPATH
+ Value: 0x7
+ - Tag: DT_FLAGS
+ Value: 0xaabbccdd
+ - Tag: DT_PREINIT_ARRAY
+ Value: 0x1000
+ - Tag: DT_PREINIT_ARRAYSZ
+ Value: 0x10
+ - Tag: DT_SYMTAB_SHNDX
+ Value: 0x1000
+ - Tag: DT_RELRSZ
+ Value: 0x10
+ - Tag: DT_RELR
+ Value: 0x1000
+ - Tag: DT_RELRENT
+ Value: 0x4321
+ - Tag: DT_ANDROID_REL
+ Value: 0x1000
+ - Tag: DT_ANDROID_RELSZ
+ Value: 0x10
+ - Tag: DT_ANDROID_RELA
+ Value: 0x1000
+ - Tag: DT_ANDROID_RELASZ
+ Value: 0x10
+ - Tag: DT_ANDROID_RELR
+ Value: 0x1000
+ - Tag: DT_ANDROID_RELRSZ
+ Value: 0x10
+ - Tag: DT_ANDROID_RELRENT
+ Value: 0x1234
+ - Tag: DT_GNU_HASH
+ Value: 0x1000
+ - Tag: DT_TLSDESC_PLT
+ Value: 0x1000
+ - Tag: DT_TLSDESC_GOT
+ Value: 0x1000
+ - Tag: DT_RELACOUNT
+ Value: 0x0
+ - Tag: DT_RELCOUNT
+ Value: 0x0
+ - Tag: DT_FLAGS_1
+ Value: 0x87654321
+ - Tag: DT_VERSYM
+ Value: 0x1000
+ - Tag: DT_VERDEF
+ Value: 0x1000
+ - Tag: DT_VERDEFNUM
+ Value: 0x0
+ - Tag: DT_VERNEED
+ Value: 0x1000
+ - Tag: DT_VERNEEDNUM
+ Value: 0x0
+ - Tag: DT_AUXILIARY
+ Value: 0x1
+ - Tag: DT_FILTER
+ Value: 0x3
+## Show behaviour for unknown values in special and unmarked ranges.
+## An arbitrary unknown value outside of the special ranges.
+ - Tag: 0x12345678
+ Value: 0x87654321
+## An OS specific tag.
+ - Tag: 0x6abcdef0
+ Value: 0x99887766
+## A processor specific tags.
+ - Tag: 0x76543210
+ Value: 0x55556666
- Tag: DT_NULL
Value: 0x0
ProgramHeaders:
diff --git a/llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test b/llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
index 44155e4bf834..c033a2ac60c7 100644
--- a/llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
+++ b/llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
@@ -1,142 +1,142 @@
## Show that all non-machine specific tags can be read and printed correctly.
## Also show that -d is an alias for --dynamic-table.
-# RUN: yaml2obj %s -o %t
-# RUN: llvm-readobj --dynamic-table %t \
-# RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix=LLVM
-# RUN: llvm-readobj -d %t | FileCheck %s --check-prefix=LLVM
-# RUN: llvm-readelf --dynamic-table %t \
-# RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix=GNU
-# RUN: llvm-readelf -d %t | FileCheck %s --check-prefix=GNU
+# RUN: yaml2obj --docnum=1 %s -o %t1
+# RUN: llvm-readobj --dynamic-table %t1 \
+# RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix=LLVM64
+# RUN: llvm-readobj -d %t1 | FileCheck %s --check-prefix=LLVM64
+# RUN: llvm-readelf --dynamic-table %t1 \
+# RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix=GNU64
+# RUN: llvm-readelf -d %t1 | FileCheck %s --check-prefix=GNU64
-# LLVM:DynamicSection [ (61 entries)
-# LLVM-NEXT: Tag Type Name/Value
-# LLVM-NEXT: 0x0000000000000001 NEEDED Shared library: [D]
-# LLVM-NEXT: 0x0000000000000002 PLTRELSZ 16 (bytes)
-# LLVM-NEXT: 0x0000000000000003 PLTGOT 0x1000
-# LLVM-NEXT: 0x0000000000000004 HASH 0x1000
-# LLVM-NEXT: 0x0000000000000005 STRTAB 0x1000
-# LLVM-NEXT: 0x0000000000000006 SYMTAB 0x1000
-# LLVM-NEXT: 0x0000000000000007 RELA 0x1000
-# LLVM-NEXT: 0x0000000000000008 RELASZ 16 (bytes)
-# LLVM-NEXT: 0x0000000000000009 RELAENT 1929 (bytes)
-# LLVM-NEXT: 0x000000000000000A STRSZ 16 (bytes)
-# LLVM-NEXT: 0x000000000000000B SYMENT 2439 (bytes)
-# LLVM-NEXT: 0x000000000000000C INIT 0x1000
-# LLVM-NEXT: 0x000000000000000D FINI 0x1000
-# LLVM-NEXT: 0x000000000000000E SONAME Library soname: [U]
-# LLVM-NEXT: 0x000000000000000F RPATH Library rpath: [f]
-# LLVM-NEXT: 0x0000000000000010 SYMBOLIC 0x1234567890ABCDEF
-# LLVM-NEXT: 0x0000000000000011 REL 0x1000
-# LLVM-NEXT: 0x0000000000000012 RELSZ 16 (bytes)
-# LLVM-NEXT: 0x0000000000000013 RELENT 291 (bytes)
-# LLVM-NEXT: 0x0000000000000014 PLTREL RELA
-# LLVM-NEXT: 0x0000000000000015 DEBUG 0xFEDCBA0987654321
-# LLVM-NEXT: 0x0000000000000016 TEXTREL 0x1122334455667788
-# LLVM-NEXT: 0x0000000000000017 JMPREL 0x1000
-# LLVM-NEXT: 0x0000000000000018 BIND_NOW 0x8877665544332211
-# LLVM-NEXT: 0x0000000000000019 INIT_ARRAY 0x1000
-# LLVM-NEXT: 0x000000000000001A FINI_ARRAY 0x1000
-# LLVM-NEXT: 0x000000000000001B INIT_ARRAYSZ 16 (bytes)
-# LLVM-NEXT: 0x000000000000001C FINI_ARRAYSZ 16 (bytes)
-# LLVM-NEXT: 0x000000000000001D RUNPATH Library runpath: [w]
-# LLVM-NEXT: 0x000000000000001E FLAGS ORIGIN SYMBOLIC TEXTREL BIND_NOW STATIC_TLS {{$}}
-# LLVM-NEXT: 0x0000000000000020 PREINIT_ARRAY 0x1000
-# LLVM-NEXT: 0x0000000000000021 PREINIT_ARRAYSZ 16 (bytes)
-# LLVM-NEXT: 0x0000000000000022 SYMTAB_SHNDX 0x1000
-# LLVM-NEXT: 0x0000000000000023 RELRSZ 0x10
-# LLVM-NEXT: 0x0000000000000024 RELR 0x1000
-# LLVM-NEXT: 0x0000000000000025 RELRENT 0x4321
-# LLVM-NEXT: 0x000000006000000F ANDROID_REL 0x1000
-# LLVM-NEXT: 0x0000000060000010 ANDROID_RELSZ 16 (bytes)
-# LLVM-NEXT: 0x0000000060000011 ANDROID_RELA 0x1000
-# LLVM-NEXT: 0x0000000060000012 ANDROID_RELASZ 16 (bytes)
-# LLVM-NEXT: 0x000000006FFFE000 ANDROID_RELR 0x1000
-# LLVM-NEXT: 0x000000006FFFE001 ANDROID_RELRSZ 0x10
-# LLVM-NEXT: 0x000000006FFFE003 ANDROID_RELRENT 0x1234
-# LLVM-NEXT: 0x000000006FFFFEF5 GNU_HASH 0x1000
-# LLVM-NEXT: 0x000000006FFFFEF6 TLSDESC_PLT 0x1000
-# LLVM-NEXT: 0x000000006FFFFEF7 TLSDESC_GOT 0x1000
-# LLVM-NEXT: 0x000000006FFFFFF9 RELACOUNT 0
-# LLVM-NEXT: 0x000000006FFFFFFA RELCOUNT 0
-# LLVM-NEXT: 0x000000006FFFFFFB FLAGS_1 NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON {{$}}
-# LLVM-NEXT: 0x000000006FFFFFF0 VERSYM 0x1000
-# LLVM-NEXT: 0x000000006FFFFFFC VERDEF 0x1000
-# LLVM-NEXT: 0x000000006FFFFFFD VERDEFNUM 0
-# 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:>0x12345678 0x8765432187654321
-# LLVM-NEXT: 0x000000006ABCDEF0 <unknown:>0x6abcdef0 0x9988776655443322
-# LLVM-NEXT: 0x0000000076543210 <unknown:>0x76543210 0x5555666677778888
-# LLVM-NEXT: 0x0000000000000000 NULL 0x0
-# LLVM-NEXT:]
+# LLVM64:DynamicSection [ (61 entries)
+# LLVM64-NEXT: Tag Type Name/Value
+# LLVM64-NEXT: 0x0000000000000001 NEEDED Shared library: [D]
+# LLVM64-NEXT: 0x0000000000000002 PLTRELSZ 16 (bytes)
+# LLVM64-NEXT: 0x0000000000000003 PLTGOT 0x1000
+# LLVM64-NEXT: 0x0000000000000004 HASH 0x1000
+# LLVM64-NEXT: 0x0000000000000005 STRTAB 0x1000
+# LLVM64-NEXT: 0x0000000000000006 SYMTAB 0x1000
+# LLVM64-NEXT: 0x0000000000000007 RELA 0x1000
+# LLVM64-NEXT: 0x0000000000000008 RELASZ 16 (bytes)
+# LLVM64-NEXT: 0x0000000000000009 RELAENT 1929 (bytes)
+# LLVM64-NEXT: 0x000000000000000A STRSZ 16 (bytes)
+# LLVM64-NEXT: 0x000000000000000B SYMENT 2439 (bytes)
+# LLVM64-NEXT: 0x000000000000000C INIT 0x1000
+# LLVM64-NEXT: 0x000000000000000D FINI 0x1000
+# LLVM64-NEXT: 0x000000000000000E SONAME Library soname: [U]
+# LLVM64-NEXT: 0x000000000000000F RPATH Library rpath: [f]
+# LLVM64-NEXT: 0x0000000000000010 SYMBOLIC 0x1234567890ABCDEF
+# LLVM64-NEXT: 0x0000000000000011 REL 0x1000
+# LLVM64-NEXT: 0x0000000000000012 RELSZ 16 (bytes)
+# LLVM64-NEXT: 0x0000000000000013 RELENT 291 (bytes)
+# LLVM64-NEXT: 0x0000000000000014 PLTREL RELA
+# LLVM64-NEXT: 0x0000000000000015 DEBUG 0xFEDCBA0987654321
+# LLVM64-NEXT: 0x0000000000000016 TEXTREL 0x1122334455667788
+# LLVM64-NEXT: 0x0000000000000017 JMPREL 0x1000
+# LLVM64-NEXT: 0x0000000000000018 BIND_NOW 0x8877665544332211
+# LLVM64-NEXT: 0x0000000000000019 INIT_ARRAY 0x1000
+# LLVM64-NEXT: 0x000000000000001A FINI_ARRAY 0x1000
+# LLVM64-NEXT: 0x000000000000001B INIT_ARRAYSZ 16 (bytes)
+# LLVM64-NEXT: 0x000000000000001C FINI_ARRAYSZ 16 (bytes)
+# LLVM64-NEXT: 0x000000000000001D RUNPATH Library runpath: [w]
+# LLVM64-NEXT: 0x000000000000001E FLAGS ORIGIN SYMBOLIC TEXTREL BIND_NOW STATIC_TLS {{$}}
+# LLVM64-NEXT: 0x0000000000000020 PREINIT_ARRAY 0x1000
+# LLVM64-NEXT: 0x0000000000000021 PREINIT_ARRAYSZ 16 (bytes)
+# LLVM64-NEXT: 0x0000000000000022 SYMTAB_SHNDX 0x1000
+# LLVM64-NEXT: 0x0000000000000023 RELRSZ 0x10
+# LLVM64-NEXT: 0x0000000000000024 RELR 0x1000
+# LLVM64-NEXT: 0x0000000000000025 RELRENT 0x4321
+# LLVM64-NEXT: 0x000000006000000F ANDROID_REL 0x1000
+# LLVM64-NEXT: 0x0000000060000010 ANDROID_RELSZ 16 (bytes)
+# LLVM64-NEXT: 0x0000000060000011 ANDROID_RELA 0x1000
+# LLVM64-NEXT: 0x0000000060000012 ANDROID_RELASZ 16 (bytes)
+# LLVM64-NEXT: 0x000000006FFFE000 ANDROID_RELR 0x1000
+# LLVM64-NEXT: 0x000000006FFFE001 ANDROID_RELRSZ 0x10
+# LLVM64-NEXT: 0x000000006FFFE003 ANDROID_RELRENT 0x1234
+# LLVM64-NEXT: 0x000000006FFFFEF5 GNU_HASH 0x1000
+# LLVM64-NEXT: 0x000000006FFFFEF6 TLSDESC_PLT 0x1000
+# LLVM64-NEXT: 0x000000006FFFFEF7 TLSDESC_GOT 0x1000
+# LLVM64-NEXT: 0x000000006FFFFFF9 RELACOUNT 0
+# LLVM64-NEXT: 0x000000006FFFFFFA RELCOUNT 0
+# LLVM64-NEXT: 0x000000006FFFFFFB FLAGS_1 NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON {{$}}
+# LLVM64-NEXT: 0x000000006FFFFFF0 VERSYM 0x1000
+# LLVM64-NEXT: 0x000000006FFFFFFC VERDEF 0x1000
+# LLVM64-NEXT: 0x000000006FFFFFFD VERDEFNUM 0
+# LLVM64-NEXT: 0x000000006FFFFFFE VERNEED 0x1000
+# LLVM64-NEXT: 0x000000006FFFFFFF VERNEEDNUM 0
+# LLVM64-NEXT: 0x000000007FFFFFFD AUXILIARY Auxiliary library: [D]
+# LLVM64-NEXT: 0x000000007FFFFFFE USED Not needed object: [U]
+# LLVM64-NEXT: 0x000000007FFFFFFF FILTER Filter library: [U]
+# LLVM64-NEXT: 0x0000000012345678 <unknown:>0x12345678 0x8765432187654321
+# LLVM64-NEXT: 0x000000006ABCDEF0 <unknown:>0x6abcdef0 0x9988776655443322
+# LLVM64-NEXT: 0x0000000076543210 <unknown:>0x76543210 0x5555666677778888
+# LLVM64-NEXT: 0x0000000000000000 NULL 0x0
+# LLVM64-NEXT:]
-# GNU:Dynamic section at offset {{.*}} contains 61 entries:
-# GNU-NEXT: Tag Type Name/Value
-# GNU-NEXT: 0x0000000000000001 (NEEDED) Shared library: [D]
-# GNU-NEXT: 0x0000000000000002 (PLTRELSZ) 16 (bytes)
-# GNU-NEXT: 0x0000000000000003 (PLTGOT) 0x1000
-# GNU-NEXT: 0x0000000000000004 (HASH) 0x1000
-# GNU-NEXT: 0x0000000000000005 (STRTAB) 0x1000
-# GNU-NEXT: 0x0000000000000006 (SYMTAB) 0x1000
-# GNU-NEXT: 0x0000000000000007 (RELA) 0x1000
-# GNU-NEXT: 0x0000000000000008 (RELASZ) 16 (bytes)
-# GNU-NEXT: 0x0000000000000009 (RELAENT) 1929 (bytes)
-# GNU-NEXT: 0x000000000000000a (STRSZ) 16 (bytes)
-# GNU-NEXT: 0x000000000000000b (SYMENT) 2439 (bytes)
-# GNU-NEXT: 0x000000000000000c (INIT) 0x1000
-# GNU-NEXT: 0x000000000000000d (FINI) 0x1000
-# GNU-NEXT: 0x000000000000000e (SONAME) Library soname: [U]
-# GNU-NEXT: 0x000000000000000f (RPATH) Library rpath: [f]
-# GNU-NEXT: 0x0000000000000010 (SYMBOLIC) 0x1234567890abcdef
-# GNU-NEXT: 0x0000000000000011 (REL) 0x1000
-# GNU-NEXT: 0x0000000000000012 (RELSZ) 16 (bytes)
-# GNU-NEXT: 0x0000000000000013 (RELENT) 291 (bytes)
-# GNU-NEXT: 0x0000000000000014 (PLTREL) RELA
-# GNU-NEXT: 0x0000000000000015 (DEBUG) 0xfedcba0987654321
-# GNU-NEXT: 0x0000000000000016 (TEXTREL) 0x1122334455667788
-# GNU-NEXT: 0x0000000000000017 (JMPREL) 0x1000
-# GNU-NEXT: 0x0000000000000018 (BIND_NOW) 0x8877665544332211
-# GNU-NEXT: 0x0000000000000019 (INIT_ARRAY) 0x1000
-# GNU-NEXT: 0x000000000000001a (FINI_ARRAY) 0x1000
-# GNU-NEXT: 0x000000000000001b (INIT_ARRAYSZ) 16 (bytes)
-# GNU-NEXT: 0x000000000000001c (FINI_ARRAYSZ) 16 (bytes)
-# GNU-NEXT: 0x000000000000001d (RUNPATH) Library runpath: [w]
-# GNU-NEXT: 0x000000000000001e (FLAGS) ORIGIN SYMBOLIC TEXTREL BIND_NOW STATIC_TLS {{$}}
-# GNU-NEXT: 0x0000000000000020 (PREINIT_ARRAY) 0x1000
-# GNU-NEXT: 0x0000000000000021 (PREINIT_ARRAYSZ) 16 (bytes)
-# GNU-NEXT: 0x0000000000000022 (SYMTAB_SHNDX) 0x1000
-# GNU-NEXT: 0x0000000000000023 (RELRSZ) 0x10
-# GNU-NEXT: 0x0000000000000024 (RELR) 0x1000
-# GNU-NEXT: 0x0000000000000025 (RELRENT) 0x4321
-# GNU-NEXT: 0x000000006000000f (ANDROID_REL) 0x1000
-# GNU-NEXT: 0x0000000060000010 (ANDROID_RELSZ) 16 (bytes)
-# GNU-NEXT: 0x0000000060000011 (ANDROID_RELA) 0x1000
-# GNU-NEXT: 0x0000000060000012 (ANDROID_RELASZ) 16 (bytes)
-# GNU-NEXT: 0x000000006fffe000 (ANDROID_RELR) 0x1000
-# GNU-NEXT: 0x000000006fffe001 (ANDROID_RELRSZ) 0x10
-# GNU-NEXT: 0x000000006fffe003 (ANDROID_RELRENT) 0x1234
-# GNU-NEXT: 0x000000006ffffef5 (GNU_HASH) 0x1000
-# GNU-NEXT: 0x000000006ffffef6 (TLSDESC_PLT) 0x1000
-# GNU-NEXT: 0x000000006ffffef7 (TLSDESC_GOT) 0x1000
-# GNU-NEXT: 0x000000006ffffff9 (RELACOUNT) 0
-# GNU-NEXT: 0x000000006ffffffa (RELCOUNT) 0
-# GNU-NEXT: 0x000000006ffffffb (FLAGS_1) NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON {{$}}
-# GNU-NEXT: 0x000000006ffffff0 (VERSYM) 0x1000
-# GNU-NEXT: 0x000000006ffffffc (VERDEF) 0x1000
-# GNU-NEXT: 0x000000006ffffffd (VERDEFNUM) 0
-# 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:>0x12345678) 0x8765432187654321
-# GNU-NEXT: 0x000000006abcdef0 (<unknown:>0x6abcdef0) 0x9988776655443322
-# GNU-NEXT: 0x0000000076543210 (<unknown:>0x76543210) 0x5555666677778888
-# GNU-NEXT: 0x0000000000000000 (NULL) 0x0
+# GNU64:Dynamic section at offset {{.*}} contains 61 entries:
+# GNU64-NEXT: Tag Type Name/Value
+# GNU64-NEXT: 0x0000000000000001 (NEEDED) Shared library: [D]
+# GNU64-NEXT: 0x0000000000000002 (PLTRELSZ) 16 (bytes)
+# GNU64-NEXT: 0x0000000000000003 (PLTGOT) 0x1000
+# GNU64-NEXT: 0x0000000000000004 (HASH) 0x1000
+# GNU64-NEXT: 0x0000000000000005 (STRTAB) 0x1000
+# GNU64-NEXT: 0x0000000000000006 (SYMTAB) 0x1000
+# GNU64-NEXT: 0x0000000000000007 (RELA) 0x1000
+# GNU64-NEXT: 0x0000000000000008 (RELASZ) 16 (bytes)
+# GNU64-NEXT: 0x0000000000000009 (RELAENT) 1929 (bytes)
+# GNU64-NEXT: 0x000000000000000a (STRSZ) 16 (bytes)
+# GNU64-NEXT: 0x000000000000000b (SYMENT) 2439 (bytes)
+# GNU64-NEXT: 0x000000000000000c (INIT) 0x1000
+# GNU64-NEXT: 0x000000000000000d (FINI) 0x1000
+# GNU64-NEXT: 0x000000000000000e (SONAME) Library soname: [U]
+# GNU64-NEXT: 0x000000000000000f (RPATH) Library rpath: [f]
+# GNU64-NEXT: 0x0000000000000010 (SYMBOLIC) 0x1234567890abcdef
+# GNU64-NEXT: 0x0000000000000011 (REL) 0x1000
+# GNU64-NEXT: 0x0000000000000012 (RELSZ) 16 (bytes)
+# GNU64-NEXT: 0x0000000000000013 (RELENT) 291 (bytes)
+# GNU64-NEXT: 0x0000000000000014 (PLTREL) RELA
+# GNU64-NEXT: 0x0000000000000015 (DEBUG) 0xfedcba0987654321
+# GNU64-NEXT: 0x0000000000000016 (TEXTREL) 0x1122334455667788
+# GNU64-NEXT: 0x0000000000000017 (JMPREL) 0x1000
+# GNU64-NEXT: 0x0000000000000018 (BIND_NOW) 0x8877665544332211
+# GNU64-NEXT: 0x0000000000000019 (INIT_ARRAY) 0x1000
+# GNU64-NEXT: 0x000000000000001a (FINI_ARRAY) 0x1000
+# GNU64-NEXT: 0x000000000000001b (INIT_ARRAYSZ) 16 (bytes)
+# GNU64-NEXT: 0x000000000000001c (FINI_ARRAYSZ) 16 (bytes)
+# GNU64-NEXT: 0x000000000000001d (RUNPATH) Library runpath: [w]
+# GNU64-NEXT: 0x000000000000001e (FLAGS) ORIGIN SYMBOLIC TEXTREL BIND_NOW STATIC_TLS {{$}}
+# GNU64-NEXT: 0x0000000000000020 (PREINIT_ARRAY) 0x1000
+# GNU64-NEXT: 0x0000000000000021 (PREINIT_ARRAYSZ) 16 (bytes)
+# GNU64-NEXT: 0x0000000000000022 (SYMTAB_SHNDX) 0x1000
+# GNU64-NEXT: 0x0000000000000023 (RELRSZ) 0x10
+# GNU64-NEXT: 0x0000000000000024 (RELR) 0x1000
+# GNU64-NEXT: 0x0000000000000025 (RELRENT) 0x4321
+# GNU64-NEXT: 0x000000006000000f (ANDROID_REL) 0x1000
+# GNU64-NEXT: 0x0000000060000010 (ANDROID_RELSZ) 16 (bytes)
+# GNU64-NEXT: 0x0000000060000011 (ANDROID_RELA) 0x1000
+# GNU64-NEXT: 0x0000000060000012 (ANDROID_RELASZ) 16 (bytes)
+# GNU64-NEXT: 0x000000006fffe000 (ANDROID_RELR) 0x1000
+# GNU64-NEXT: 0x000000006fffe001 (ANDROID_RELRSZ) 0x10
+# GNU64-NEXT: 0x000000006fffe003 (ANDROID_RELRENT) 0x1234
+# GNU64-NEXT: 0x000000006ffffef5 (GNU_HASH) 0x1000
+# GNU64-NEXT: 0x000000006ffffef6 (TLSDESC_PLT) 0x1000
+# GNU64-NEXT: 0x000000006ffffef7 (TLSDESC_GOT) 0x1000
+# GNU64-NEXT: 0x000000006ffffff9 (RELACOUNT) 0
+# GNU64-NEXT: 0x000000006ffffffa (RELCOUNT) 0
+# GNU64-NEXT: 0x000000006ffffffb (FLAGS_1) NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON {{$}}
+# GNU64-NEXT: 0x000000006ffffff0 (VERSYM) 0x1000
+# GNU64-NEXT: 0x000000006ffffffc (VERDEF) 0x1000
+# GNU64-NEXT: 0x000000006ffffffd (VERDEFNUM) 0
+# GNU64-NEXT: 0x000000006ffffffe (VERNEED) 0x1000
+# GNU64-NEXT: 0x000000006fffffff (VERNEEDNUM) 0
+# GNU64-NEXT: 0x000000007ffffffd (AUXILIARY) Auxiliary library: [D]
+# GNU64-NEXT: 0x000000007ffffffe (USED) Not needed object: [U]
+# GNU64-NEXT: 0x000000007fffffff (FILTER) Filter library: [U]
+# GNU64-NEXT: 0x0000000012345678 (<unknown:>0x12345678) 0x8765432187654321
+# GNU64-NEXT: 0x000000006abcdef0 (<unknown:>0x6abcdef0) 0x9988776655443322
+# GNU64-NEXT: 0x0000000076543210 (<unknown:>0x76543210) 0x5555666677778888
+# GNU64-NEXT: 0x0000000000000000 (NULL) 0x0
--- !ELF
FileHeader:
@@ -268,11 +268,14 @@ Sections:
Value: 0x3
- Tag: DT_FILTER
Value: 0x3
- # Show behaviour for unknown values in special and un-marked ranges.
+## Show behaviour for unknown values in special and un-marked ranges.
+## An arbitrary unknown value outside of the special ranges.
- Tag: 0x12345678
Value: 0x8765432187654321
+## An OS specific tag.
- Tag: 0x6abcdef0
Value: 0x9988776655443322
+## A processor specific tags.
- Tag: 0x76543210
Value: 0x5555666677778888
- Tag: DT_NULL
@@ -287,3 +290,293 @@ ProgramHeaders:
VAddr: 0x1010
Sections:
- Section: .dynamic
+
+# RUN: yaml2obj %s --docnum=2 -o %t2
+# RUN: llvm-readobj --dynamic-table %t2 \
+# RUN: | FileCheck %s --check-prefix=LLVM32 --strict-whitespace --match-full-lines
+# RUN: llvm-readobj -d %t2 | FileCheck %s --check-prefix=LLVM32 --strict-whitespace --match-full-lines
+# RUN: llvm-readelf --dynamic-table %t2 \
+# RUN: | FileCheck %s --check-prefix=GNU32 --strict-whitespace --match-full-lines
+# RUN: llvm-readelf -d %t2 | FileCheck %s --check-prefix=GNU32 --strict-whitespace --match-full-lines
+
+# LLVM32:DynamicSection [ (61 entries)
+# LLVM32-NEXT: Tag Type Name/Value
+# LLVM32-NEXT: 0x00000001 NEEDED Shared library: [D]
+# LLVM32-NEXT: 0x00000002 PLTRELSZ 16 (bytes)
+# LLVM32-NEXT: 0x00000003 PLTGOT 0x1000
+# LLVM32-NEXT: 0x00000004 HASH 0x1000
+# LLVM32-NEXT: 0x00000005 STRTAB 0x1000
+# LLVM32-NEXT: 0x00000006 SYMTAB 0x1000
+# LLVM32-NEXT: 0x00000007 RELA 0x1000
+# LLVM32-NEXT: 0x00000008 RELASZ 16 (bytes)
+# LLVM32-NEXT: 0x00000009 RELAENT 1929 (bytes)
+# LLVM32-NEXT: 0x0000000A STRSZ 16 (bytes)
+# LLVM32-NEXT: 0x0000000B SYMENT 2439 (bytes)
+# LLVM32-NEXT: 0x0000000C INIT 0x1000
+# LLVM32-NEXT: 0x0000000D FINI 0x1000
+# LLVM32-NEXT: 0x0000000E SONAME Library soname: [U]
+# LLVM32-NEXT: 0x0000000F RPATH Library rpath: [f]
+# LLVM32-NEXT: 0x00000010 SYMBOLIC 0x12345678
+# LLVM32-NEXT: 0x00000011 REL 0x1000
+# LLVM32-NEXT: 0x00000012 RELSZ 16 (bytes)
+# LLVM32-NEXT: 0x00000013 RELENT 291 (bytes)
+# LLVM32-NEXT: 0x00000014 PLTREL RELA
+# LLVM32-NEXT: 0x00000015 DEBUG 0xFEDCBA09
+# LLVM32-NEXT: 0x00000016 TEXTREL 0x11223344
+# LLVM32-NEXT: 0x00000017 JMPREL 0x1000
+# LLVM32-NEXT: 0x00000018 BIND_NOW 0x88776655
+# LLVM32-NEXT: 0x00000019 INIT_ARRAY 0x1000
+# LLVM32-NEXT: 0x0000001A FINI_ARRAY 0x1000
+# LLVM32-NEXT: 0x0000001B INIT_ARRAYSZ 16 (bytes)
+# LLVM32-NEXT: 0x0000001C FINI_ARRAYSZ 16 (bytes)
+# LLVM32-NEXT: 0x0000001D RUNPATH Library runpath: [w]
+# LLVM32-NEXT: 0x0000001E FLAGS ORIGIN SYMBOLIC TEXTREL BIND_NOW STATIC_TLS {{$}}
+# LLVM32-NEXT: 0x00000020 PREINIT_ARRAY 0x1000
+# LLVM32-NEXT: 0x00000021 PREINIT_ARRAYSZ 16 (bytes)
+# LLVM32-NEXT: 0x00000022 SYMTAB_SHNDX 0x1000
+# LLVM32-NEXT: 0x00000023 RELRSZ 0x10
+# LLVM32-NEXT: 0x00000024 RELR 0x1000
+# LLVM32-NEXT: 0x00000025 RELRENT 0x4321
+# LLVM32-NEXT: 0x6000000F ANDROID_REL 0x1000
+# LLVM32-NEXT: 0x60000010 ANDROID_RELSZ 16 (bytes)
+# LLVM32-NEXT: 0x60000011 ANDROID_RELA 0x1000
+# LLVM32-NEXT: 0x60000012 ANDROID_RELASZ 16 (bytes)
+# LLVM32-NEXT: 0x6FFFE000 ANDROID_RELR 0x1000
+# LLVM32-NEXT: 0x6FFFE001 ANDROID_RELRSZ 0x10
+# LLVM32-NEXT: 0x6FFFE003 ANDROID_RELRENT 0x1234
+# LLVM32-NEXT: 0x6FFFFEF5 GNU_HASH 0x1000
+# LLVM32-NEXT: 0x6FFFFEF6 TLSDESC_PLT 0x1000
+# LLVM32-NEXT: 0x6FFFFEF7 TLSDESC_GOT 0x1000
+# LLVM32-NEXT: 0x6FFFFFF9 RELACOUNT 0
+# LLVM32-NEXT: 0x6FFFFFFA RELCOUNT 0
+# LLVM32-NEXT: 0x6FFFFFFB FLAGS_1 NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON {{$}}
+# LLVM32-NEXT: 0x6FFFFFF0 VERSYM 0x1000
+# LLVM32-NEXT: 0x6FFFFFFC VERDEF 0x1000
+# LLVM32-NEXT: 0x6FFFFFFD VERDEFNUM 0
+# LLVM32-NEXT: 0x6FFFFFFE VERNEED 0x1000
+# LLVM32-NEXT: 0x6FFFFFFF VERNEEDNUM 0
+# LLVM32-NEXT: 0x7FFFFFFD AUXILIARY Auxiliary library: [D]
+# LLVM32-NEXT: 0x7FFFFFFE USED Not needed object: [U]
+# LLVM32-NEXT: 0x7FFFFFFF FILTER Filter library: [U]
+# LLVM32-NEXT: 0x12345678 <unknown:>0x12345678 0x87654321
+# LLVM32-NEXT: 0x6ABCDEF0 <unknown:>0x6abcdef0 0x99887766
+# LLVM32-NEXT: 0x76543210 <unknown:>0x76543210 0x55556666
+# LLVM32-NEXT: 0x00000000 NULL 0x0
+# LLVM32-NEXT:]
+
+# GNU32:Dynamic section at offset 0x84 contains 61 entries:
+# GNU32-NEXT: Tag Type Name/Value
+# GNU32-NEXT: 0x00000001 (NEEDED) Shared library: [D]
+# GNU32-NEXT: 0x00000002 (PLTRELSZ) 16 (bytes)
+# GNU32-NEXT: 0x00000003 (PLTGOT) 0x1000
+# GNU32-NEXT: 0x00000004 (HASH) 0x1000
+# GNU32-NEXT: 0x00000005 (STRTAB) 0x1000
+# GNU32-NEXT: 0x00000006 (SYMTAB) 0x1000
+# GNU32-NEXT: 0x00000007 (RELA) 0x1000
+# GNU32-NEXT: 0x00000008 (RELASZ) 16 (bytes)
+# GNU32-NEXT: 0x00000009 (RELAENT) 1929 (bytes)
+# GNU32-NEXT: 0x0000000a (STRSZ) 16 (bytes)
+# GNU32-NEXT: 0x0000000b (SYMENT) 2439 (bytes)
+# GNU32-NEXT: 0x0000000c (INIT) 0x1000
+# GNU32-NEXT: 0x0000000d (FINI) 0x1000
+# GNU32-NEXT: 0x0000000e (SONAME) Library soname: [U]
+# GNU32-NEXT: 0x0000000f (RPATH) Library rpath: [f]
+# GNU32-NEXT: 0x00000010 (SYMBOLIC) 0x12345678
+# GNU32-NEXT: 0x00000011 (REL) 0x1000
+# GNU32-NEXT: 0x00000012 (RELSZ) 16 (bytes)
+# GNU32-NEXT: 0x00000013 (RELENT) 291 (bytes)
+# GNU32-NEXT: 0x00000014 (PLTREL) RELA
+# GNU32-NEXT: 0x00000015 (DEBUG) 0xfedcba09
+# GNU32-NEXT: 0x00000016 (TEXTREL) 0x11223344
+# GNU32-NEXT: 0x00000017 (JMPREL) 0x1000
+# GNU32-NEXT: 0x00000018 (BIND_NOW) 0x88776655
+# GNU32-NEXT: 0x00000019 (INIT_ARRAY) 0x1000
+# GNU32-NEXT: 0x0000001a (FINI_ARRAY) 0x1000
+# GNU32-NEXT: 0x0000001b (INIT_ARRAYSZ) 16 (bytes)
+# GNU32-NEXT: 0x0000001c (FINI_ARRAYSZ) 16 (bytes)
+# GNU32-NEXT: 0x0000001d (RUNPATH) Library runpath: [w]
+# GNU32-NEXT: 0x0000001e (FLAGS) ORIGIN SYMBOLIC TEXTREL BIND_NOW STATIC_TLS {{$}}
+# GNU32-NEXT: 0x00000020 (PREINIT_ARRAY) 0x1000
+# GNU32-NEXT: 0x00000021 (PREINIT_ARRAYSZ) 16 (bytes)
+# GNU32-NEXT: 0x00000022 (SYMTAB_SHNDX) 0x1000
+# GNU32-NEXT: 0x00000023 (RELRSZ) 0x10
+# GNU32-NEXT: 0x00000024 (RELR) 0x1000
+# GNU32-NEXT: 0x00000025 (RELRENT) 0x4321
+# GNU32-NEXT: 0x6000000f (ANDROID_REL) 0x1000
+# GNU32-NEXT: 0x60000010 (ANDROID_RELSZ) 16 (bytes)
+# GNU32-NEXT: 0x60000011 (ANDROID_RELA) 0x1000
+# GNU32-NEXT: 0x60000012 (ANDROID_RELASZ) 16 (bytes)
+# GNU32-NEXT: 0x6fffe000 (ANDROID_RELR) 0x1000
+# GNU32-NEXT: 0x6fffe001 (ANDROID_RELRSZ) 0x10
+# GNU32-NEXT: 0x6fffe003 (ANDROID_RELRENT) 0x1234
+# GNU32-NEXT: 0x6ffffef5 (GNU_HASH) 0x1000
+# GNU32-NEXT: 0x6ffffef6 (TLSDESC_PLT) 0x1000
+# GNU32-NEXT: 0x6ffffef7 (TLSDESC_GOT) 0x1000
+# GNU32-NEXT: 0x6ffffff9 (RELACOUNT) 0
+# GNU32-NEXT: 0x6ffffffa (RELCOUNT) 0
+# GNU32-NEXT: 0x6ffffffb (FLAGS_1) NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON {{$}}
+# GNU32-NEXT: 0x6ffffff0 (VERSYM) 0x1000
+# GNU32-NEXT: 0x6ffffffc (VERDEF) 0x1000
+# GNU32-NEXT: 0x6ffffffd (VERDEFNUM) 0
+# GNU32-NEXT: 0x6ffffffe (VERNEED) 0x1000
+# GNU32-NEXT: 0x6fffffff (VERNEEDNUM) 0
+# GNU32-NEXT: 0x7ffffffd (AUXILIARY) Auxiliary library: [D]
+# GNU32-NEXT: 0x7ffffffe (USED) Not needed object: [U]
+# GNU32-NEXT: 0x7fffffff (FILTER) Filter library: [U]
+# GNU32-NEXT: 0x12345678 (<unknown:>0x12345678) 0x87654321
+# GNU32-NEXT: 0x6abcdef0 (<unknown:>0x6abcdef0) 0x99887766
+# GNU32-NEXT: 0x76543210 (<unknown:>0x76543210) 0x55556666
+# GNU32-NEXT: 0x00000000 (NULL) 0x0
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_386
+Sections:
+ - Name: .dynstr
+ Type: SHT_STRTAB
+ Address: 0x1000
+ Size: 0x10
+ Content: "004400550066007700"
+ - Name: .dynamic
+ Type: SHT_DYNAMIC
+ Address: 0x1010
+ Entries:
+ - Tag: DT_NEEDED
+ Value: 0x1
+ - Tag: DT_PLTRELSZ
+ Value: 0x10
+ - Tag: DT_PLTGOT
+ Value: 0x1000
+ - Tag: DT_HASH
+ Value: 0x1000
+ - Tag: DT_STRTAB
+ Value: 0x1000
+ - Tag: DT_SYMTAB
+ Value: 0x1000
+ - Tag: DT_RELA
+ Value: 0x1000
+ - Tag: DT_RELASZ
+ Value: 0x10
+ - Tag: DT_RELAENT
+ Value: 0x789
+ - Tag: DT_STRSZ
+ Value: 0x10
+ - Tag: DT_SYMENT
+ Value: 0x987
+ - Tag: DT_INIT
+ Value: 0x1000
+ - Tag: DT_FINI
+ Value: 0x1000
+ - Tag: DT_SONAME
+ Value: 0x3
+ - Tag: DT_RPATH
+ Value: 0x5
+ - Tag: DT_SYMBOLIC
+ Value: 0x12345678
+ - Tag: DT_REL
+ Value: 0x1000
+ - Tag: DT_RELSZ
+ Value: 0x10
+ - Tag: DT_RELENT
+ Value: 0x123
+ - Tag: DT_PLTREL
+ Value: 0x7
+ - Tag: DT_DEBUG
+ Value: 0xfedcba09
+ - Tag: DT_TEXTREL
+ Value: 0x11223344
+ - Tag: DT_JMPREL
+ Value: 0x1000
+ - Tag: DT_BIND_NOW
+ Value: 0x88776655
+ - Tag: DT_INIT_ARRAY
+ Value: 0x1000
+ - Tag: DT_FINI_ARRAY
+ Value: 0x1000
+ - Tag: DT_INIT_ARRAYSZ
+ Value: 0x10
+ - Tag: DT_FINI_ARRAYSZ
+ Value: 0x10
+ - Tag: DT_RUNPATH
+ Value: 0x7
+ - Tag: DT_FLAGS
+ Value: 0xffffffff
+ - Tag: DT_PREINIT_ARRAY
+ Value: 0x1000
+ - Tag: DT_PREINIT_ARRAYSZ
+ Value: 0x10
+ - Tag: DT_SYMTAB_SHNDX
+ Value: 0x1000
+ - Tag: DT_RELRSZ
+ Value: 0x10
+ - Tag: DT_RELR
+ Value: 0x1000
+ - Tag: DT_RELRENT
+ Value: 0x4321
+ - Tag: DT_ANDROID_REL
+ Value: 0x1000
+ - Tag: DT_ANDROID_RELSZ
+ Value: 0x10
+ - Tag: DT_ANDROID_RELA
+ Value: 0x1000
+ - Tag: DT_ANDROID_RELASZ
+ Value: 0x10
+ - Tag: DT_ANDROID_RELR
+ Value: 0x1000
+ - Tag: DT_ANDROID_RELRSZ
+ Value: 0x10
+ - Tag: DT_ANDROID_RELRENT
+ Value: 0x1234
+ - Tag: DT_GNU_HASH
+ Value: 0x1000
+ - Tag: DT_TLSDESC_PLT
+ Value: 0x1000
+ - Tag: DT_TLSDESC_GOT
+ Value: 0x1000
+ - Tag: DT_RELACOUNT
+ Value: 0x0
+ - Tag: DT_RELCOUNT
+ Value: 0x0
+ - Tag: DT_FLAGS_1
+ Value: 0xffffffff
+ - Tag: DT_VERSYM
+ Value: 0x1000
+ - Tag: DT_VERDEF
+ Value: 0x1000
+ - Tag: DT_VERDEFNUM
+ Value: 0x0
+ - Tag: DT_VERNEED
+ Value: 0x1000
+ - Tag: DT_VERNEEDNUM
+ 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.
+## An arbitrary unknown value outside of the special ranges.
+ - Tag: 0x12345678
+ Value: 0x87654321
+## An OS specific tag.
+ - Tag: 0x6abcdef0
+ Value: 0x99887766
+## A processor specific tags.
+ - Tag: 0x76543210
+ Value: 0x55556666
+ - Tag: DT_NULL
+ Value: 0x0
+ProgramHeaders:
+ - Type: PT_LOAD
+ VAddr: 0x1000
+ Sections:
+ - Section: .dynstr
+ - Section: .dynamic
+ - Type: PT_DYNAMIC
+ VAddr: 0x1010
+ Sections:
+ - Section: .dynamic
More information about the llvm-commits
mailing list