aboutsummaryrefslogtreecommitdiff
path: root/test/tools/llvm-readobj
diff options
context:
space:
mode:
Diffstat (limited to 'test/tools/llvm-readobj')
-rw-r--r--test/tools/llvm-readobj/Inputs/dynamic-table.c7
-rw-r--r--test/tools/llvm-readobj/Inputs/dynamic-table.mipsbin0 -> 5395 bytes
-rw-r--r--test/tools/llvm-readobj/Inputs/magic.coff-importlibbin0 -> 40 bytes
-rw-r--r--test/tools/llvm-readobj/Inputs/magic.coff-unknownbin0 -> 450 bytes
-rw-r--r--test/tools/llvm-readobj/Inputs/relocs.py25
-rw-r--r--test/tools/llvm-readobj/Inputs/rpath.exe.elf-x86_64bin0 -> 5632 bytes
-rw-r--r--test/tools/llvm-readobj/Inputs/trivial.exe.coff-i386bin0 -> 2560 bytes
-rw-r--r--test/tools/llvm-readobj/dynamic.test33
-rw-r--r--test/tools/llvm-readobj/file-headers.test118
-rw-r--r--test/tools/llvm-readobj/lit.local.cfg1
-rw-r--r--test/tools/llvm-readobj/program-headers.test30
-rw-r--r--test/tools/llvm-readobj/reloc-types.test23
-rw-r--r--test/tools/llvm-readobj/relocations.test2
-rw-r--r--test/tools/llvm-readobj/rpath.test4
-rw-r--r--test/tools/llvm-readobj/sections-ext.test30
-rw-r--r--test/tools/llvm-readobj/symbols.test9
16 files changed, 228 insertions, 54 deletions
diff --git a/test/tools/llvm-readobj/Inputs/dynamic-table.c b/test/tools/llvm-readobj/Inputs/dynamic-table.c
new file mode 100644
index 000000000000..6d36e8a71186
--- /dev/null
+++ b/test/tools/llvm-readobj/Inputs/dynamic-table.c
@@ -0,0 +1,7 @@
+// clang -target mipsel-linux-gnu -shared -fPIC -lc dynamic-table.c \
+// -o dynamic-table.mips
+int puts(const char *);
+
+void foo(void) {
+ puts("Hello, World");
+}
diff --git a/test/tools/llvm-readobj/Inputs/dynamic-table.mips b/test/tools/llvm-readobj/Inputs/dynamic-table.mips
new file mode 100644
index 000000000000..ab36ceeb5a00
--- /dev/null
+++ b/test/tools/llvm-readobj/Inputs/dynamic-table.mips
Binary files differ
diff --git a/test/tools/llvm-readobj/Inputs/magic.coff-importlib b/test/tools/llvm-readobj/Inputs/magic.coff-importlib
new file mode 100644
index 000000000000..b934afb41a8d
--- /dev/null
+++ b/test/tools/llvm-readobj/Inputs/magic.coff-importlib
Binary files differ
diff --git a/test/tools/llvm-readobj/Inputs/magic.coff-unknown b/test/tools/llvm-readobj/Inputs/magic.coff-unknown
new file mode 100644
index 000000000000..7b3b4619a8cd
--- /dev/null
+++ b/test/tools/llvm-readobj/Inputs/magic.coff-unknown
Binary files differ
diff --git a/test/tools/llvm-readobj/Inputs/relocs.py b/test/tools/llvm-readobj/Inputs/relocs.py
index 232d080d7d78..af9459df8ee2 100644
--- a/test/tools/llvm-readobj/Inputs/relocs.py
+++ b/test/tools/llvm-readobj/Inputs/relocs.py
@@ -533,30 +533,6 @@ class Relocs_Elf_i386(Enum):
R_386_IRELATIVE = 42
R_386_NUM = 43
-class Relocs_Elf_MBlaze(Enum):
- R_MICROBLAZE_NONE = 0
- R_MICROBLAZE_32 = 1
- R_MICROBLAZE_32_PCREL = 2
- R_MICROBLAZE_64_PCREL = 3
- R_MICROBLAZE_32_PCREL_LO = 4
- R_MICROBLAZE_64 = 5
- R_MICROBLAZE_32_LO = 6
- R_MICROBLAZE_SRO32 = 7
- R_MICROBLAZE_SRW32 = 8
- R_MICROBLAZE_64_NONE = 9
- R_MICROBLAZE_32_SYM_OP_SYM = 10
- R_MICROBLAZE_GNU_VTINHERIT = 11
- R_MICROBLAZE_GNU_VTENTRY = 12
- R_MICROBLAZE_GOTPC_64 = 13
- R_MICROBLAZE_GOT_64 = 14
- R_MICROBLAZE_PLT_64 = 15
- R_MICROBLAZE_REL = 16
- R_MICROBLAZE_JUMP_SLOT = 17
- R_MICROBLAZE_GLOB_DAT = 18
- R_MICROBLAZE_GOTOFF_64 = 19
- R_MICROBLAZE_GOTOFF_32 = 20
- R_MICROBLAZE_COPY = 21
-
class Relocs_Elf_PPC32(Enum):
R_PPC_NONE = 0
R_PPC_ADDR32 = 1
@@ -1071,7 +1047,6 @@ craftElf("relocs.obj.elf-aarch64", "aarch64", Relocs_Elf_AA
craftElf("relocs.obj.elf-arm", "arm-unknown-unknown", Relocs_Elf_ARM.entries(), "b sym")
craftElf("relocs.obj.elf-mips", "mips-unknown-linux", Relocs_Elf_Mips.entries(), "lui $2, %hi(sym)")
craftElf("relocs.obj.elf-mips64el", "mips64el-unknown-linux", Relocs_Elf_Mips.entries(), "lui $2, %hi(sym)")
-#craftElf("relocs.obj.elf-mblaze", "mblaze-unknown-unknown", Relocs_Elf_MBlaze.entries(), ...)
#craftElf("relocs.obj.elf-hexagon", "hexagon-unknown-unknown", Relocs_Elf_Hexagon.entries(), ...)
craftCoff("relocs.obj.coff-i386", "i386-pc-win32", Relocs_Coff_i386.entries(), "mov foo@imgrel(%ebx, %ecx, 4), %eax")
diff --git a/test/tools/llvm-readobj/Inputs/rpath.exe.elf-x86_64 b/test/tools/llvm-readobj/Inputs/rpath.exe.elf-x86_64
new file mode 100644
index 000000000000..8c01c502cf86
--- /dev/null
+++ b/test/tools/llvm-readobj/Inputs/rpath.exe.elf-x86_64
Binary files differ
diff --git a/test/tools/llvm-readobj/Inputs/trivial.exe.coff-i386 b/test/tools/llvm-readobj/Inputs/trivial.exe.coff-i386
new file mode 100644
index 000000000000..1558d2452ecc
--- /dev/null
+++ b/test/tools/llvm-readobj/Inputs/trivial.exe.coff-i386
Binary files differ
diff --git a/test/tools/llvm-readobj/dynamic.test b/test/tools/llvm-readobj/dynamic.test
new file mode 100644
index 000000000000..78a9b3bd937e
--- /dev/null
+++ b/test/tools/llvm-readobj/dynamic.test
@@ -0,0 +1,33 @@
+RUN: llvm-readobj -dynamic-table %p/Inputs/dynamic-table.mips \
+RUN: | FileCheck %s -check-prefix ELF-MIPS
+
+ELF-MIPS: Format: ELF32-mips
+ELF-MIPS: Arch: mipsel
+ELF-MIPS: AddressSize: 32bit
+ELF-MIPS: LoadName:
+ELF-MIPS: DynamicSection [ (23 entries)
+ELF-MIPS: Tag Type Name/Value
+ELF-MIPS: 0x00000001 NEEDED SharedLibrary (libc.so.6)
+ELF-MIPS: 0x0000000C INIT 0x528
+ELF-MIPS: 0x0000000D FINI 0x860
+ELF-MIPS: 0x00000004 HASH 0x210
+ELF-MIPS: 0x00000005 STRTAB 0x3D8
+ELF-MIPS: 0x00000006 SYMTAB 0x2A8
+ELF-MIPS: 0x0000000A STRSZ 231 (bytes)
+ELF-MIPS: 0x0000000B SYMENT 16 (bytes)
+ELF-MIPS: 0x00000003 PLTGOT 0x108E0
+ELF-MIPS: 0x00000011 REL 0x518
+ELF-MIPS: 0x00000012 RELSZ 16 (bytes)
+ELF-MIPS: 0x00000013 RELENT 8 (bytes)
+ELF-MIPS: 0x70000001 MIPS_RLD_VERSION 1
+ELF-MIPS: 0x70000005 MIPS_FLAGS 0x2
+ELF-MIPS: 0x70000006 MIPS_BASE_ADDRESS 0x0
+ELF-MIPS: 0x7000000A MIPS_LOCAL_GOTNO 10
+ELF-MIPS: 0x70000011 MIPS_SYMTABNO 19
+ELF-MIPS: 0x70000012 MIPS_UNREFEXTNO 26
+ELF-MIPS: 0x70000013 MIPS_GOTSYM 0xD
+ELF-MIPS: 0x6FFFFFFE VERNEED 0x4E8
+ELF-MIPS: 0x6FFFFFFF VERNEEDNUM 1
+ELF-MIPS: 0x6FFFFFF0 VERSYM 0x4C0
+ELF-MIPS: 0x00000000 NULL 0x0
+ELF-MIPS: ]
diff --git a/test/tools/llvm-readobj/file-headers.test b/test/tools/llvm-readobj/file-headers.test
index 226eb9342334..b2b454772d6a 100644
--- a/test/tools/llvm-readobj/file-headers.test
+++ b/test/tools/llvm-readobj/file-headers.test
@@ -2,10 +2,16 @@ RUN: llvm-readobj -h %p/Inputs/trivial.obj.coff-i386 \
RUN: | FileCheck %s -check-prefix COFF32
RUN: llvm-readobj -h %p/Inputs/trivial.obj.coff-x86-64 \
RUN: | FileCheck %s -check-prefix COFF64
+RUN: llvm-readobj -h %p/Inputs/trivial.exe.coff-i386 \
+RUN: | FileCheck %s -check-prefix PE32
RUN: llvm-readobj -h %p/Inputs/trivial.obj.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF32
RUN: llvm-readobj -h %p/Inputs/trivial.obj.elf-x86-64 \
RUN: | FileCheck %s -check-prefix ELF64
+RUN: llvm-readobj -h %p/Inputs/magic.coff-unknown \
+RUN: | FileCheck %s -check-prefix COFF-UNKNOWN
+RUN: llvm-readobj -h %p/Inputs/magic.coff-importlib \
+RUN: | FileCheck %s -check-prefix COFF-IMPORTLIB
COFF32: File: {{(.*[/\\])?}}trivial.obj.coff-i386
COFF32-NEXT: Format: COFF-i386
@@ -98,3 +104,115 @@ ELF64-NEXT: SectionHeaderEntrySize: 64
ELF64-NEXT: SectionHeaderCount: 10
ELF64-NEXT: StringTableSectionIndex: 7
ELF64-NEXT: }
+
+PE32: File: {{(.*[/\\])?}}trivial.exe.coff-i386
+PE32-NEXT: Format: COFF-i386
+PE32-NEXT: Arch: i386
+PE32-NEXT: AddressSize: 32bit
+PE32-NEXT: ImageFileHeader {
+PE32-NEXT: Machine: IMAGE_FILE_MACHINE_I386 (0x14C)
+PE32-NEXT: SectionCount: 3
+PE32-NEXT: TimeDateStamp: 2013-07-16 00:39:15 (0x51E49633)
+PE32-NEXT: PointerToSymbolTable: 0x0
+PE32-NEXT: SymbolCount: 0
+PE32-NEXT: OptionalHeaderSize: 224
+PE32-NEXT: Characteristics [ (0x102)
+PE32-NEXT: IMAGE_FILE_32BIT_MACHINE (0x100)
+PE32-NEXT: IMAGE_FILE_EXECUTABLE_IMAGE (0x2)
+PE32-NEXT: ]
+PE32-NEXT: }
+PE32-NEXT: ImageOptionalHeader {
+PE32-NEXT: MajorLinkerVersion: 11
+PE32-NEXT: MinorLinkerVersion: 0
+PE32-NEXT: SizeOfCode: 512
+PE32-NEXT: SizeOfInitializedData: 1024
+PE32-NEXT: SizeOfUninitializedData: 0
+PE32-NEXT: AddressOfEntryPoint: 0x1000
+PE32-NEXT: BaseOfCode: 0x1000
+PE32-NEXT: BaseOfData: 0x2000
+PE32-NEXT: ImageBase: 0x400000
+PE32-NEXT: SectionAlignment: 4096
+PE32-NEXT: FileAlignment: 512
+PE32-NEXT: MajorOperatingSystemVersion: 6
+PE32-NEXT: MinorOperatingSystemVersion: 0
+PE32-NEXT: MajorImageVersion: 0
+PE32-NEXT: MinorImageVersion: 0
+PE32-NEXT: MajorSubsystemVersion: 6
+PE32-NEXT: MinorSubsystemVersion: 0
+PE32-NEXT: SizeOfImage: 16384
+PE32-NEXT: SizeOfHeaders: 1024
+PE32-NEXT: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)
+PE32-NEXT: Subsystem [ (0x8140)
+PE32-NEXT: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE (0x40)
+PE32-NEXT: IMAGE_DLL_CHARACTERISTICS_NX_COMPAT (0x100)
+PE32-NEXT: IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE (0x8000)
+PE32-NEXT: ]
+PE32-NEXT: SizeOfStackReserve: 1048576
+PE32-NEXT: SizeOfStackCommit: 4096
+PE32-NEXT: SizeOfHeapReserve: 1048576
+PE32-NEXT: SizeOfHeapCommit: 4096
+PE32-NEXT: NumberOfRvaAndSize: 16
+PE32-NEXT: DataDirectory {
+PE32-NEXT: ExportTableRVA: 0x0
+PE32-NEXT: ExportTableSize: 0x0
+PE32-NEXT: ImportTableRVA: 0x0
+PE32-NEXT: ImportTableSize: 0x0
+PE32-NEXT: ResourceTableRVA: 0x0
+PE32-NEXT: ResourceTableSize: 0x0
+PE32-NEXT: ExceptionTableRVA: 0x0
+PE32-NEXT: ExceptionTableSize: 0x0
+PE32-NEXT: CertificateTableRVA: 0x0
+PE32-NEXT: CertificateTableSize: 0x0
+PE32-NEXT: BaseRelocationTableRVA: 0x3000
+PE32-NEXT: BaseRelocationTableSize: 0xC
+PE32-NEXT: DebugRVA: 0x0
+PE32-NEXT: DebugSize: 0x0
+PE32-NEXT: ArchitectureRVA: 0x0
+PE32-NEXT: ArchitectureSize: 0x0
+PE32-NEXT: GlobalPtrRVA: 0x0
+PE32-NEXT: GlobalPtrSize: 0x0
+PE32-NEXT: TLSTableRVA: 0x0
+PE32-NEXT: TLSTableSize: 0x0
+PE32-NEXT: LoadConfigTableRVA: 0x0
+PE32-NEXT: LoadConfigTableSize: 0x0
+PE32-NEXT: BoundImportRVA: 0x0
+PE32-NEXT: BoundImportSize: 0x0
+PE32-NEXT: IATRVA: 0x0
+PE32-NEXT: IATSize: 0x0
+PE32-NEXT: DelayImportDescriptorRVA: 0x0
+PE32-NEXT: DelayImportDescriptorSize: 0x0
+PE32-NEXT: CLRRuntimeHeaderRVA: 0x0
+PE32-NEXT: CLRRuntimeHeaderSize: 0x0
+PE32-NEXT: ReservedRVA: 0x0
+PE32-NEXT: ReservedSize: 0x0
+PE32-NEXT: }
+PE32-NEXT: }
+
+COFF-UNKNOWN: Format: COFF-<unknown arch>
+COFF-UNKNOWN-NEXT: Arch: unknown
+COFF-UNKNOWN-NEXT: AddressSize: 32bit
+COFF-UNKNOWN-NEXT: ImageFileHeader {
+COFF-UNKNOWN-NEXT: Machine: IMAGE_FILE_MACHINE_UNKNOWN (0x0)
+COFF-UNKNOWN-NEXT: SectionCount: 3
+COFF-UNKNOWN-NEXT: TimeDateStamp: 2013-11-14 21:19:28 (0x52853E60)
+COFF-UNKNOWN-NEXT: PointerToSymbolTable: 0xF8
+COFF-UNKNOWN-NEXT: SymbolCount: 11
+COFF-UNKNOWN-NEXT: OptionalHeaderSize: 0
+COFF-UNKNOWN-NEXT: Characteristics [ (0x0)
+COFF-UNKNOWN-NEXT: ]
+COFF-UNKNOWN-NEXT: }
+
+COFF-IMPORTLIB: Format: COFF-<unknown arch>
+COFF-IMPORTLIB-NEXT: Arch: unknown
+COFF-IMPORTLIB-NEXT: AddressSize: 32bit
+COFF-IMPORTLIB-NEXT: ImageFileHeader {
+COFF-IMPORTLIB-NEXT: Machine: IMAGE_FILE_MACHINE_UNKNOWN (0x0)
+COFF-IMPORTLIB-NEXT: SectionCount: 65535
+COFF-IMPORTLIB-NEXT: TimeDateStamp: 1970-09-09 19:52:32 (0x14C0000)
+COFF-IMPORTLIB-NEXT: PointerToSymbolTable: 0x528542EB
+COFF-IMPORTLIB-NEXT: SymbolCount: 20
+COFF-IMPORTLIB-NEXT: OptionalHeaderSize: 0
+COFF-IMPORTLIB-NEXT: Characteristics [ (0x8)
+COFF-IMPORTLIB-NEXT: IMAGE_FILE_LOCAL_SYMS_STRIPPED (0x8)
+COFF-IMPORTLIB-NEXT: ]
+COFF-IMPORTLIB-NEXT: }
diff --git a/test/tools/llvm-readobj/lit.local.cfg b/test/tools/llvm-readobj/lit.local.cfg
deleted file mode 100644
index df9b335dd131..000000000000
--- a/test/tools/llvm-readobj/lit.local.cfg
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = ['.test']
diff --git a/test/tools/llvm-readobj/program-headers.test b/test/tools/llvm-readobj/program-headers.test
index 2a574bb2e646..7c22f2b529b1 100644
--- a/test/tools/llvm-readobj/program-headers.test
+++ b/test/tools/llvm-readobj/program-headers.test
@@ -2,6 +2,8 @@ RUN: llvm-readobj -program-headers %p/../../Object/Inputs/program-headers.elf-i3
RUN: | FileCheck %s -check-prefix ELF-I386
RUN: llvm-readobj -program-headers %p/../../Object/Inputs/program-headers.elf-x86-64 \
RUN: | FileCheck %s -check-prefix ELF-X86-64
+RUN: llvm-readobj -program-headers %p/../../Object/Inputs/program-headers.mips \
+RUN: | FileCheck %s -check-prefix ELF-MIPS
ELF-I386: ProgramHeaders [
ELF-I386-NEXT: ProgramHeader {
@@ -72,3 +74,31 @@ ELF-X86-64-NEXT: ]
ELF-X86-64-NEXT: Alignment: 8
ELF-X86-64-NEXT: }
ELF-X86-64-NEXT: ]
+
+ELF-MIPS: ProgramHeaders [
+ELF-MIPS-NEXT: ProgramHeader {
+ELF-MIPS-NEXT: Type: PT_MIPS_REGINFO (0x70000000)
+ELF-MIPS-NEXT: Offset: 0x74
+ELF-MIPS-NEXT: VirtualAddress: 0x400074
+ELF-MIPS-NEXT: PhysicalAddress: 0x400074
+ELF-MIPS-NEXT: FileSize: 24
+ELF-MIPS-NEXT: MemSize: 24
+ELF-MIPS-NEXT: Flags [ (0x4)
+ELF-MIPS-NEXT: PF_R (0x4)
+ELF-MIPS-NEXT: ]
+ELF-MIPS-NEXT: Alignment: 4
+ELF-MIPS-NEXT: }
+ELF-MIPS-NEXT: ProgramHeader {
+ELF-MIPS-NEXT: Type: PT_LOAD (0x1)
+ELF-MIPS-NEXT: Offset: 0x0
+ELF-MIPS-NEXT: VirtualAddress: 0x400000
+ELF-MIPS-NEXT: PhysicalAddress: 0x400000
+ELF-MIPS-NEXT: FileSize: 160
+ELF-MIPS-NEXT: MemSize: 160
+ELF-MIPS-NEXT: Flags [ (0x5)
+ELF-MIPS-NEXT: PF_R (0x4)
+ELF-MIPS-NEXT: PF_X (0x1)
+ELF-MIPS-NEXT: ]
+ELF-MIPS-NEXT: Alignment: 65536
+ELF-MIPS-NEXT: }
+ELF-MIPS-NEXT: ]
diff --git a/test/tools/llvm-readobj/reloc-types.test b/test/tools/llvm-readobj/reloc-types.test
index 08603bc7fb55..0c8b54dbc6bf 100644
--- a/test/tools/llvm-readobj/reloc-types.test
+++ b/test/tools/llvm-readobj/reloc-types.test
@@ -460,29 +460,6 @@ ELF-MIPS64EL: Type: R_MIPS_COPY/R_MIPS_COPY/R_MIPS_COPY (8289918)
ELF-MIPS64EL: Type: R_MIPS_JUMP_SLOT/R_MIPS_JUMP_SLOT/R_MIPS_JUMP_SLOT (8355711)
ELF-MIPS64EL: Type: R_MIPS_NUM/R_MIPS_NUM/R_MIPS_NUM (14342874)
-ELF-MBLAZE: Type: R_MICROBLAZE_NONE (0)
-ELF-MBLAZE: Type: R_MICROBLAZE_32 (1)
-ELF-MBLAZE: Type: R_MICROBLAZE_32_PCREL (2)
-ELF-MBLAZE: Type: R_MICROBLAZE_64_PCREL (3)
-ELF-MBLAZE: Type: R_MICROBLAZE_32_PCREL_LO (4)
-ELF-MBLAZE: Type: R_MICROBLAZE_64 (5)
-ELF-MBLAZE: Type: R_MICROBLAZE_32_LO (6)
-ELF-MBLAZE: Type: R_MICROBLAZE_SRO32 (7)
-ELF-MBLAZE: Type: R_MICROBLAZE_SRW32 (8)
-ELF-MBLAZE: Type: R_MICROBLAZE_64_NONE (9)
-ELF-MBLAZE: Type: R_MICROBLAZE_32_SYM_OP_SYM (10)
-ELF-MBLAZE: Type: R_MICROBLAZE_GNU_VTINHERIT (11)
-ELF-MBLAZE: Type: R_MICROBLAZE_GNU_VTENTRY (12)
-ELF-MBLAZE: Type: R_MICROBLAZE_GOTPC_64 (13)
-ELF-MBLAZE: Type: R_MICROBLAZE_GOT_64 (14)
-ELF-MBLAZE: Type: R_MICROBLAZE_PLT_64 (15)
-ELF-MBLAZE: Type: R_MICROBLAZE_REL (16)
-ELF-MBLAZE: Type: R_MICROBLAZE_JUMP_SLOT (17)
-ELF-MBLAZE: Type: R_MICROBLAZE_GLOB_DAT (18)
-ELF-MBLAZE: Type: R_MICROBLAZE_GOTOFF_64 (19)
-ELF-MBLAZE: Type: R_MICROBLAZE_GOTOFF_32 (20)
-ELF-MBLAZE: Type: R_MICROBLAZE_COPY (21)
-
ELF-HEXAGON: Type: R_HEX_NONE (0)
ELF-HEXAGON: Type: R_HEX_B22_PCREL (1)
ELF-HEXAGON: Type: R_HEX_B15_PCREL (2)
diff --git a/test/tools/llvm-readobj/relocations.test b/test/tools/llvm-readobj/relocations.test
index dec7f862982c..3a87ff548e39 100644
--- a/test/tools/llvm-readobj/relocations.test
+++ b/test/tools/llvm-readobj/relocations.test
@@ -22,7 +22,7 @@ COFF-NEXT: }
COFF-NEXT: ]
ELF: Relocations [
-ELF-NEXT: Section (1) .text {
+ELF-NEXT: Section (2) .rel.text {
ELF-NEXT: 0xC R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 0x0
ELF-NEXT: 0x12 R_386_GOTOFF .L.str 0x0
ELF-NEXT: 0x1A R_386_PLT32 puts 0x0
diff --git a/test/tools/llvm-readobj/rpath.test b/test/tools/llvm-readobj/rpath.test
new file mode 100644
index 000000000000..600938ee9385
--- /dev/null
+++ b/test/tools/llvm-readobj/rpath.test
@@ -0,0 +1,4 @@
+RUN: llvm-readobj -dynamic-table %p/Inputs/rpath.exe.elf-x86_64 \
+RUN: | FileCheck %s
+
+CHECK: 0x000000000000000F RPATH /usr/local/lib
diff --git a/test/tools/llvm-readobj/sections-ext.test b/test/tools/llvm-readobj/sections-ext.test
index 327f040854f9..e3a40c3eb192 100644
--- a/test/tools/llvm-readobj/sections-ext.test
+++ b/test/tools/llvm-readobj/sections-ext.test
@@ -108,10 +108,6 @@ ELF-NEXT: Info: 0
ELF-NEXT: AddressAlignment: 16
ELF-NEXT: EntrySize: 0
ELF-NEXT: Relocations [
-ELF-NEXT: 0xC R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 0x0
-ELF-NEXT: 0x12 R_386_GOTOFF .L.str 0x0
-ELF-NEXT: 0x1A R_386_PLT32 puts 0x0
-ELF-NEXT: 0x1F R_386_PLT32 SomeOtherFunction 0x0
ELF-NEXT: ]
ELF-NEXT: Symbols [
ELF-NEXT: Symbol {
@@ -139,6 +135,32 @@ ELF-NEXT: 0010: 8D830000 00008904 24E8FCFF FFFFE8FC |........$.......|
ELF-NEXT: 0020: FFFFFF31 C083C408 5BC3 |...1....[.|
ELF-NEXT: )
ELF-NEXT: }
+ELF-NEXT: Section {
+ELF-NEXT: Index: 2
+ELF-NEXT: Name: .rel.text (1)
+ELF-NEXT: Type: SHT_REL (0x9)
+ELF-NEXT: Flags [ (0x0)
+ELF-NEXT: ]
+ELF-NEXT: Address: 0x0
+ELF-NEXT: Offset: 0x360
+ELF-NEXT: Size: 32
+ELF-NEXT: Link: 8
+ELF-NEXT: Info: 1
+ELF-NEXT: AddressAlignment: 4
+ELF-NEXT: EntrySize: 8
+ELF-NEXT: Relocations [
+ELF-NEXT: 0xC R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 0x0
+ELF-NEXT: 0x12 R_386_GOTOFF .L.str 0x0
+ELF-NEXT: 0x1A R_386_PLT32 puts 0x0
+ELF-NEXT: 0x1F R_386_PLT32 SomeOtherFunction 0x0
+ELF-NEXT: ]
+ELF-NEXT: Symbols [
+ELF-NEXT: ]
+ELF-NEXT: SectionData (
+ELF-NEXT: 0000: 0C000000 0A0A0000 12000000 09020000 |................|
+ELF-NEXT: 0010: 1A000000 040B0000 1F000000 04090000 |................|
+ELF-NEXT: )
+ELF-NEXT: }
MACHO-I386: Sections [
MACHO-I386-NEXT: Section {
diff --git a/test/tools/llvm-readobj/symbols.test b/test/tools/llvm-readobj/symbols.test
index d33bd8ed2cd0..e014377e586f 100644
--- a/test/tools/llvm-readobj/symbols.test
+++ b/test/tools/llvm-readobj/symbols.test
@@ -25,6 +25,15 @@ COFF-NEXT: }
ELF: Symbols [
ELF-NEXT: Symbol {
+ELF-NEXT: Name: (0)
+ELF-NEXT: Value: 0x0
+ELF-NEXT: Size: 0
+ELF-NEXT: Binding: Local (0x0)
+ELF-NEXT: Type: None (0x0)
+ELF-NEXT: Other: 0
+ELF-NEXT: Section: (0x0)
+ELF-NEXT: }
+ELF-NEXT: Symbol {
ELF-NEXT: Name: trivial.ll (1)
ELF-NEXT: Value: 0x0
ELF-NEXT: Size: 0