summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/ELF/Inputs
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/tools/llvm-readobj/ELF/Inputs')
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/abiflags.obj.elf-mipsbin0 -> 920 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/abiflags.obj.elf-mipselbin0 -> 1320 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/compression.zlib.style.elf-x86-64bin0 -> 10384 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-exe.mipsbin0 -> 6333 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-so.mipsbin0 -> 5395 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-so.x86bin0 -> 8256 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table.c14
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/elf-dynamic-tags-machine-specific.yaml276
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs1.s37
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs2.s15
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs3.s31
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/elf-relr-relocs1.s5
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/elf-relr-relocs2.s5
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-i386bin0 -> 1080 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-ppcbin0 -> 1204 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-ppc64bin0 -> 1784 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-x86_64bin0 -> 1616 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/got-empty.exe.mipselbin0 -> 9400 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/got-over.exe.elf-mipsbin0 -> 1648 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/got-plt.exe.elf-mipselbin0 -> 6209 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/got-static.exe.mipsbin0 -> 1168 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/got-tls.so.elf-mips64elbin0 -> 7398 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/mips-options.elf-mips64elbin0 -> 9288 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/mips-rld-map-rel.elf-mipselbin0 -> 2484 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/options.obj.elf-mipselbin0 -> 1720 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/phdrs-elf.exe-i386bin0 -> 7512 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/phdrs-elf.exe-x86_64bin0 -> 9030 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/ppc64.exebin0 -> 69520 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/reginfo.obj.elf-mipselbin0 -> 490 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/relocs.obj.elf-x86_64bin0 -> 1984 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/rpath.exe.elf-x86_64bin0 -> 5632 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/st-other.obj.elf-mipsbin0 -> 334 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/st-other.obj.elf-mips16bin0 -> 334 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/symbols-proc-specific.elf-hexagonbin0 -> 600 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.ll21
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-amdhsa-gfx803bin0 -> 2208 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-i386bin0 -> 896 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-mipselbin0 -> 629 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-x86-64bin0 -> 1256 bytes
39 files changed, 404 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/abiflags.obj.elf-mips b/llvm/test/tools/llvm-readobj/ELF/Inputs/abiflags.obj.elf-mips
new file mode 100644
index 00000000000..edcd50becec
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/abiflags.obj.elf-mips
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/abiflags.obj.elf-mipsel b/llvm/test/tools/llvm-readobj/ELF/Inputs/abiflags.obj.elf-mipsel
new file mode 100644
index 00000000000..bb5f43d2862
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/abiflags.obj.elf-mipsel
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/compression.zlib.style.elf-x86-64 b/llvm/test/tools/llvm-readobj/ELF/Inputs/compression.zlib.style.elf-x86-64
new file mode 100644
index 00000000000..34cdb8a89ed
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/compression.zlib.style.elf-x86-64
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-exe.mips b/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-exe.mips
new file mode 100644
index 00000000000..28d8e33752c
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-exe.mips
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-so.mips b/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-so.mips
new file mode 100644
index 00000000000..ab36ceeb5a0
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-so.mips
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-so.x86 b/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-so.x86
new file mode 100644
index 00000000000..01bd1c2fc1e
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table-so.x86
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table.c b/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table.c
new file mode 100644
index 00000000000..9d45720eb67
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/dynamic-table.c
@@ -0,0 +1,14 @@
+// clang -target x86_64-linux-gnu -shared -fPIC -lc dynamic-table.c \
+// -o dynamic-table-so.x86 -Wl,-f,aux.so -Wl,-F,filter.so
+// clang -target mipsel-linux-gnu -shared -fPIC -lc dynamic-table.c \
+// -o dynamic-table-so.mips
+// clang -target mipsel-linux-gnu -lc dynamic-table.c \
+// -o dynamic-table-exe.mips
+int puts(const char *);
+
+__thread int foo;
+
+int main(void) {
+ puts("Hello, World");
+ foo = 0;
+}
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-dynamic-tags-machine-specific.yaml b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-dynamic-tags-machine-specific.yaml
new file mode 100644
index 00000000000..222b8723e11
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-dynamic-tags-machine-specific.yaml
@@ -0,0 +1,276 @@
+# Used by llvm-readobj/elf-dynamic-tags-machine-specific.test and
+# llvm-objdump/elf-dynamic-section-machine-specific.test.
+
+# First document: Hexagon
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_HEXAGON
+Sections:
+ - Name: .dynstr
+ Type: SHT_STRTAB
+ Address: 0x1000
+ Size: 0x10
+ Content: "004400550066007700"
+ - Name: .dynamic
+ Type: SHT_DYNAMIC
+ Address: 0x1010
+ Entries:
+ - Tag: DT_HASH
+ Value: 0x1000
+ - Tag: DT_HEXAGON_SYMSZ
+ Value: 0x10
+ - Tag: DT_HEXAGON_VER
+ Value: 0x1000
+ - Tag: DT_HEXAGON_PLT
+ Value: 0x1000
+ - Tag: 0x1234abcd
+ Value: 0x1
+ - Tag: DT_NULL
+ Value: 0
+ProgramHeaders:
+ - Type: PT_LOAD
+ VAddr: 0x1000
+ Sections:
+ - Section: .dynstr
+ - Section: .dynamic
+ - Type: PT_DYNAMIC
+ VAddr: 0x1010
+ Sections:
+ - Section: .dynamic
+
+# Second document: MIPS
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_MIPS
+Sections:
+ - Name: .dynstr
+ Type: SHT_STRTAB
+ Address: 0x1000
+ Size: 0x10
+ Content: "004400550066007700"
+ - Name: .dynamic
+ Type: SHT_DYNAMIC
+ Address: 0x1010
+ Entries:
+ - Tag: DT_HASH
+ Value: 0x1000
+ - Tag: DT_MIPS_RLD_VERSION
+ Value: 0x12345678
+ - Tag: DT_MIPS_TIME_STAMP
+ Value: 0x11223344
+ - Tag: DT_MIPS_ICHECKSUM
+ Value: 0x11112222
+ - Tag: DT_MIPS_IVERSION
+ Value: 0x1
+ - Tag: DT_MIPS_FLAGS
+ Value: 0x11111111
+ - Tag: DT_MIPS_BASE_ADDRESS
+ Value: 0x87654321
+ - Tag: DT_MIPS_MSYM
+ Value: 0x1000
+ - Tag: DT_MIPS_CONFLICT
+ Value: 0x1000
+ - Tag: DT_MIPS_LIBLIST
+ Value: 0x1000
+ - Tag: DT_MIPS_LOCAL_GOTNO
+ Value: 0x1
+ - Tag: DT_MIPS_CONFLICTNO
+ Value: 0x1
+ - Tag: DT_MIPS_LIBLISTNO
+ Value: 0x1
+ - Tag: DT_MIPS_SYMTABNO
+ Value: 0x1
+ - Tag: DT_MIPS_UNREFEXTNO
+ Value: 0x0
+ - Tag: DT_MIPS_GOTSYM
+ Value: 0x0
+ - Tag: DT_MIPS_HIPAGENO
+ Value: 0x88776655
+ - Tag: DT_MIPS_RLD_MAP
+ Value: 0x1000
+ - Tag: DT_MIPS_DELTA_CLASS
+ Value: 0x1000
+ - Tag: DT_MIPS_DELTA_CLASS_NO
+ Value: 0x1
+ - Tag: DT_MIPS_DELTA_INSTANCE
+ Value: 0x1000
+ - Tag: DT_MIPS_DELTA_INSTANCE_NO
+ Value: 0x1
+ - Tag: DT_MIPS_DELTA_RELOC
+ Value: 0x1000
+ - Tag: DT_MIPS_DELTA_RELOC_NO
+ Value: 0x1
+ - Tag: DT_MIPS_DELTA_SYM
+ Value: 0x1000
+ - Tag: DT_MIPS_DELTA_SYM_NO
+ Value: 0x1
+ - Tag: DT_MIPS_DELTA_CLASSSYM
+ Value: 0x1000
+ - Tag: DT_MIPS_DELTA_CLASSSYM_NO
+ Value: 0x1
+ - Tag: DT_MIPS_CXX_FLAGS
+ Value: 0x88887777
+ - Tag: DT_MIPS_PIXIE_INIT
+ Value: 0x1000
+ - Tag: DT_MIPS_LOCALPAGE_GOTIDX
+ Value: 0x1
+ - Tag: DT_MIPS_LOCAL_GOTIDX
+ Value: 0x1
+ - Tag: DT_MIPS_HIDDEN_GOTIDX
+ Value: 0x1
+ - Tag: DT_MIPS_PROTECTED_GOTIDX
+ Value: 0x1
+ - Tag: DT_MIPS_OPTIONS
+ Value: 0x1000
+ - Tag: DT_MIPS_INTERFACE
+ Value: 0x1000
+ - Tag: DT_MIPS_DYNSTR_ALIGN
+ Value: 0x88888888
+ - Tag: DT_MIPS_INTERFACE_SIZE
+ Value: 0x10
+ - Tag: DT_MIPS_RLD_TEXT_RESOLVE_ADDR
+ Value: 0x8
+ - Tag: DT_MIPS_PERF_SUFFIX
+ Value: 0x0
+ - Tag: DT_MIPS_COMPACT_SIZE
+ Value: 0x10
+ - Tag: DT_MIPS_GP_VALUE
+ Value: 0x1
+ - Tag: DT_MIPS_AUX_DYNAMIC
+ Value: 0x1000
+ - Tag: DT_MIPS_PLTGOT
+ Value: 0x1000
+ - Tag: DT_MIPS_RWPLT
+ Value: 0x1000
+ - Tag: DT_MIPS_RLD_MAP_REL
+ Value: 0x1000
+ - Tag: 0x1234abcd
+ Value: 0x1
+ - Tag: DT_NULL
+ Value: 0
+ProgramHeaders:
+ - Type: PT_LOAD
+ VAddr: 0x1000
+ Sections:
+ - Section: .dynstr
+ - Section: .dynamic
+ - Type: PT_DYNAMIC
+ VAddr: 0x1010
+ Sections:
+ - Section: .dynamic
+
+# Third document: PPC
+--- !ELF
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2MSB
+ Type: ET_EXEC
+ Machine: EM_PPC
+Sections:
+ - Name: .dynstr
+ Type: SHT_STRTAB
+ Address: 0x200
+ Size: 0x10
+ Content: "004400550066007700"
+ - Name: .dynamic
+ Type: SHT_DYNAMIC
+ Address: 0x20000
+ Entries:
+ - Tag: DT_PPC_GOT
+ Value: 0x200c0
+ - Tag: DT_PPC_OPT
+ Value: 1
+ - Tag: 0x1234abcd
+ Value: 0x1
+ - Tag: DT_NULL
+ Value: 0
+ProgramHeaders:
+ - Type: PT_LOAD
+ VAddr: 0x1000
+ Sections:
+ - Section: .dynstr
+ - Section: .dynamic
+ - Type: PT_DYNAMIC
+ VAddr: 0x20000
+ Sections:
+ - Section: .dynamic
+
+# Fourth document: PPC64
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_PPC64
+Sections:
+ - Name: .dynstr
+ Type: SHT_STRTAB
+ Address: 0x1000
+ Size: 0x10
+ Content: "004400550066007700"
+ - Name: .dynamic
+ Type: SHT_DYNAMIC
+ Address: 0x1010
+ Entries:
+ - Tag: DT_HASH
+ Value: 0x1000
+ - Tag: DT_PPC64_GLINK
+ Value: 0x1000
+ - Tag: 0x1234abcd
+ Value: 0x1
+ - Tag: DT_NULL
+ Value: 0
+ProgramHeaders:
+ - Type: PT_LOAD
+ VAddr: 0x1000
+ Sections:
+ - Section: .dynstr
+ - Section: .dynamic
+ - Type: PT_DYNAMIC
+ VAddr: 0x1010
+ Sections:
+ - Section: .dynamic
+
+# Fourth document: AARCH64
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_AARCH64
+Sections:
+ - Name: .dynstr
+ Type: SHT_STRTAB
+ Address: 0x1000
+ Size: 0x10
+ Content: "004400550066007700"
+ - Name: .dynamic
+ Type: SHT_DYNAMIC
+ Address: 0x1010
+ Entries:
+ - Tag: DT_HASH
+ Value: 0x1000
+ - Tag: DT_AARCH64_BTI_PLT
+ Value: 0
+ - Tag: DT_AARCH64_PAC_PLT
+ Value: 0
+ - Tag: 0x1234abcd
+ Value: 0x1
+ - Tag: DT_NULL
+ Value: 0
+ProgramHeaders:
+ - Type: PT_LOAD
+ VAddr: 0x1000
+ Sections:
+ - Section: .dynstr
+ - Section: .dynamic
+ - Type: PT_DYNAMIC
+ VAddr: 0x1010
+ Sections:
+ - Section: .dynamic
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs1.s b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs1.s
new file mode 100644
index 00000000000..ac844095104
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs1.s
@@ -0,0 +1,37 @@
+.ascii "APS2"
+.sleb128 8 // Number of relocations
+.sleb128 4096 // Initial offset
+
+.sleb128 2 // Number of relocations in group
+.sleb128 1 // RELOCATION_GROUPED_BY_INFO_FLAG
+.sleb128 8 // R_X86_RELATIVE
+
+.sleb128 256 // Reloc 1: r_offset delta
+.sleb128 128 // Reloc 2: r_offset delta
+
+.sleb128 2 // Number of relocations in group
+.sleb128 2 // RELOCATION_GROUPED_BY_OFFSET_DELTA_FLAG
+.sleb128 8 // offset delta
+
+.sleb128 (1 << 32) | 1 // R_X86_64_64 (sym index 1)
+.sleb128 (2 << 32) | 1 // R_X86_64_64 (sym index 2)
+
+.sleb128 2 // Number of relocations in group
+.sleb128 8 // RELOCATION_GROUP_HAS_ADDEND_FLAG
+
+.sleb128 1 // offset delta
+.sleb128 (1 << 32) | 1 // R_X86_64_64 (sym index 1)
+.sleb128 8 // addend delta
+
+.sleb128 2 // offset delta
+.sleb128 (2 << 32) | 1 // R_X86_64_64 (sym index 2)
+.sleb128 4 // addend delta
+
+.sleb128 2 // Number of relocations in group
+.sleb128 12 // RELOCATION_GROUP_HAS_ADDEND_FLAG | RELOCATION_GROUPED_BY_ADDEND_FLAG
+.sleb128 -2 // addend delta
+
+.sleb128 4 // offset delta
+.sleb128 (1 << 32) | 1 // R_X86_64_64 (sym index 1)
+.sleb128 8 // offset delta
+.sleb128 (2 << 32) | 1 // R_X86_64_64 (sym index 2)
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs2.s b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs2.s
new file mode 100644
index 00000000000..73b3733e2dc
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs2.s
@@ -0,0 +1,15 @@
+.ascii "APS2"
+.sleb128 10 // Number of relocations
+.sleb128 4096 // Initial offset
+
+.sleb128 2 // Number of relocations in group
+.sleb128 2 // RELOCATION_GROUPED_BY_OFFSET_DELTA_FLAG
+.sleb128 8 // offset delta
+
+.sleb128 (1 << 8) | 1 // R_386_32 (sym index 1)
+.sleb128 (2 << 8) | 3 // R_386_GOT32 (sym index 2)
+
+.sleb128 8 // Number of relocations in group
+.sleb128 3 // RELOCATION_GROUPED_BY_OFFSET_DELTA_FLAG | RELOCATION_GROUPED_BY_INFO_FLAG
+.sleb128 -4 // offset delta
+.sleb128 8 // R_386_RELATIVE
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs3.s b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs3.s
new file mode 100644
index 00000000000..8d4faedd9e9
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-packed-relocs3.s
@@ -0,0 +1,31 @@
+.ascii "APS2"
+.sleb128 6 // Number of relocations
+.sleb128 4096 // Initial offset
+
+.sleb128 2 // Number of relocations in group
+.sleb128 8 // RELOCATION_GROUP_HAS_ADDEND_FLAG
+
+.sleb128 256 // Reloc 1: r_offset delta
+.sleb128 8 // Reloc 1: r_info R_X86_RELATIVE
+.sleb128 0 // Reloc 1: r_addend delta
+.sleb128 128 // Reloc 2: r_offset delta
+.sleb128 8 // Reloc 2: r_info R_X86_RELATIVE
+.sleb128 8 // Reloc 2: r_addend delta
+
+.sleb128 2 // Number of relocations in group
+.sleb128 0 // No RELOCATION_GROUP_HAS_ADDEND_FLAG
+
+.sleb128 128 // reloc 1: r_offset delta
+.sleb128 (1 << 32) | 1 // r_x86_64_64 (sym index 1)
+.sleb128 8 // reloc 2: r_offset delta
+.sleb128 (2 << 32) | 1 // r_x86_64_64 (sym index 2)
+
+.sleb128 2 // Number of relocations in group
+.sleb128 8 // RELOCATION_GROUP_HAS_ADDEND_FLAG
+
+.sleb128 8 // reloc 1: r_offset delta
+.sleb128 (1 << 32) | 1 // r_x86_64_64 (sym index 1)
+.sleb128 0 // reloc 1: r_addend delta
+.sleb128 8 // reloc 2: r_offset delta
+.sleb128 (2 << 32) | 1 // r_x86_64_64 (sym index 2)
+.sleb128 8 // reloc 2: r_addend delta
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-relr-relocs1.s b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-relr-relocs1.s
new file mode 100644
index 00000000000..ec4e9caa73f
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-relr-relocs1.s
@@ -0,0 +1,5 @@
+.quad 0x0000000000010d60 // Initial offset
+.quad 0x0000000000000103 // Continuation bitmap
+.quad 0x0000000000020000 // New offset
+.quad 0x00000000000f0501 // Continuation bitmap
+.quad 0x000a700550400009 // Continuation bitmap
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-relr-relocs2.s b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-relr-relocs2.s
new file mode 100644
index 00000000000..515d578971c
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/elf-relr-relocs2.s
@@ -0,0 +1,5 @@
+.long 0x00010d60 // Initial offset
+.long 0x00000103 // Continuation bitmap
+.long 0x00020000 // New offset
+.long 0x000f0501 // Continuation bitmap
+.long 0x50400009 // Continuation bitmap
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-i386 b/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-i386
new file mode 100644
index 00000000000..c222a899ba7
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-i386
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-ppc b/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-ppc
new file mode 100644
index 00000000000..fd337f343e0
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-ppc
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-ppc64 b/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-ppc64
new file mode 100644
index 00000000000..25ce5c71b38
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-ppc64
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-x86_64 b/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-x86_64
new file mode 100644
index 00000000000..612e7b2112f
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/gnuhash.so.elf-x86_64
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/got-empty.exe.mipsel b/llvm/test/tools/llvm-readobj/ELF/Inputs/got-empty.exe.mipsel
new file mode 100644
index 00000000000..b57874557c8
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/got-empty.exe.mipsel
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/got-over.exe.elf-mips b/llvm/test/tools/llvm-readobj/ELF/Inputs/got-over.exe.elf-mips
new file mode 100644
index 00000000000..27644bff330
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/got-over.exe.elf-mips
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/got-plt.exe.elf-mipsel b/llvm/test/tools/llvm-readobj/ELF/Inputs/got-plt.exe.elf-mipsel
new file mode 100644
index 00000000000..8cdc69ffa56
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/got-plt.exe.elf-mipsel
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/got-static.exe.mips b/llvm/test/tools/llvm-readobj/ELF/Inputs/got-static.exe.mips
new file mode 100644
index 00000000000..a369e32bd88
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/got-static.exe.mips
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/got-tls.so.elf-mips64el b/llvm/test/tools/llvm-readobj/ELF/Inputs/got-tls.so.elf-mips64el
new file mode 100644
index 00000000000..3afc567f85d
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/got-tls.so.elf-mips64el
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/mips-options.elf-mips64el b/llvm/test/tools/llvm-readobj/ELF/Inputs/mips-options.elf-mips64el
new file mode 100644
index 00000000000..4b6525731dd
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/mips-options.elf-mips64el
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/mips-rld-map-rel.elf-mipsel b/llvm/test/tools/llvm-readobj/ELF/Inputs/mips-rld-map-rel.elf-mipsel
new file mode 100644
index 00000000000..a8e396c2ec3
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/mips-rld-map-rel.elf-mipsel
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/options.obj.elf-mipsel b/llvm/test/tools/llvm-readobj/ELF/Inputs/options.obj.elf-mipsel
new file mode 100644
index 00000000000..6309d87c592
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/options.obj.elf-mipsel
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/phdrs-elf.exe-i386 b/llvm/test/tools/llvm-readobj/ELF/Inputs/phdrs-elf.exe-i386
new file mode 100644
index 00000000000..a5a9541aec5
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/phdrs-elf.exe-i386
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/phdrs-elf.exe-x86_64 b/llvm/test/tools/llvm-readobj/ELF/Inputs/phdrs-elf.exe-x86_64
new file mode 100644
index 00000000000..6b6520809d7
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/phdrs-elf.exe-x86_64
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/ppc64.exe b/llvm/test/tools/llvm-readobj/ELF/Inputs/ppc64.exe
new file mode 100644
index 00000000000..0db6147ca70
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/ppc64.exe
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/reginfo.obj.elf-mipsel b/llvm/test/tools/llvm-readobj/ELF/Inputs/reginfo.obj.elf-mipsel
new file mode 100644
index 00000000000..5cd09809f8b
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/reginfo.obj.elf-mipsel
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/relocs.obj.elf-x86_64 b/llvm/test/tools/llvm-readobj/ELF/Inputs/relocs.obj.elf-x86_64
new file mode 100644
index 00000000000..3ca9d8c6939
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/relocs.obj.elf-x86_64
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/rpath.exe.elf-x86_64 b/llvm/test/tools/llvm-readobj/ELF/Inputs/rpath.exe.elf-x86_64
new file mode 100644
index 00000000000..8c01c502cf8
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/rpath.exe.elf-x86_64
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/st-other.obj.elf-mips b/llvm/test/tools/llvm-readobj/ELF/Inputs/st-other.obj.elf-mips
new file mode 100644
index 00000000000..80cefc192d4
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/st-other.obj.elf-mips
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/st-other.obj.elf-mips16 b/llvm/test/tools/llvm-readobj/ELF/Inputs/st-other.obj.elf-mips16
new file mode 100644
index 00000000000..5f0a0e3de8e
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/st-other.obj.elf-mips16
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/symbols-proc-specific.elf-hexagon b/llvm/test/tools/llvm-readobj/ELF/Inputs/symbols-proc-specific.elf-hexagon
new file mode 100644
index 00000000000..f6979086937
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/symbols-proc-specific.elf-hexagon
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.ll b/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.ll
new file mode 100644
index 00000000000..c27d0cb038c
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.ll
@@ -0,0 +1,21 @@
+; Input used for generating checked-in binaries (trivial.obj.*)
+; llc -mtriple=i386-pc-win32 trivial.ll -filetype=obj -o trivial.obj.coff-i386
+; llc -mtriple=x86_64-pc-win32 trivial.ll -filetype=obj -o trivial.obj.coff-x86-64
+; llc -mtriple=i386-linux-gnu trivial.ll -filetype=obj -o trivial.obj.elf-i386 -relocation-model=pic
+; llc -mtriple=x86_64-linux-gnu trivial.ll -filetype=obj -o trivial.obj.elf-x86-64 -relocation-model=pic
+; llc -mtriple=i386-apple-darwin10 trivial.ll -filetype=obj -o trivial.obj.macho-i386 -relocation-model=pic
+; llc -mtriple=x86_64-apple-darwin10 trivial.ll -filetype=obj -o trivial.obj.macho-x86-64 -relocation-model=pic
+; llc -mtriple=wasm32-unknown-unknown trivial.ll -filetype=obj -o trivial.obj.wasm
+
+@.str = private unnamed_addr constant [13 x i8] c"Hello World\0A\00", align 1
+
+define i32 @main() nounwind {
+entry:
+ %call = tail call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0)) nounwind
+ tail call void bitcast (void (...)* @SomeOtherFunction to void ()*)() nounwind
+ ret i32 0
+}
+
+declare i32 @puts(i8* nocapture) nounwind
+
+declare void @SomeOtherFunction(...)
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-amdhsa-gfx803 b/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-amdhsa-gfx803
new file mode 100644
index 00000000000..421269cbd8b
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-amdhsa-gfx803
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-i386 b/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-i386
new file mode 100644
index 00000000000..f85e40d6261
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-i386
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-mipsel b/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-mipsel
new file mode 100644
index 00000000000..c523908605c
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-mipsel
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-x86-64 b/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-x86-64
new file mode 100644
index 00000000000..95285c1f230
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-x86-64
Binary files differ
OpenPOWER on IntegriCloud