1 // Check dynamic section tags in case of shared library file. 2 RUN: llvm-readobj -dynamic-table %p/Inputs/dynamic-table-so.mips \ 3 RUN: | FileCheck %s -check-prefix ELF-MIPS 4 5 ELF-MIPS: Format: ELF32-mips 6 ELF-MIPS: Arch: mipsel 7 ELF-MIPS: AddressSize: 32bit 8 ELF-MIPS: LoadName: 9 ELF-MIPS: DynamicSection [ (23 entries) 10 ELF-MIPS: Tag Type Name/Value 11 ELF-MIPS: 0x00000001 NEEDED SharedLibrary (libc.so.6) 12 ELF-MIPS: 0x0000000C INIT 0x528 13 ELF-MIPS: 0x0000000D FINI 0x860 14 ELF-MIPS: 0x00000004 HASH 0x210 15 ELF-MIPS: 0x00000005 STRTAB 0x3D8 16 ELF-MIPS: 0x00000006 SYMTAB 0x2A8 17 ELF-MIPS: 0x0000000A STRSZ 231 (bytes) 18 ELF-MIPS: 0x0000000B SYMENT 16 (bytes) 19 ELF-MIPS: 0x00000003 PLTGOT 0x108E0 20 ELF-MIPS: 0x00000011 REL 0x518 21 ELF-MIPS: 0x00000012 RELSZ 16 (bytes) 22 ELF-MIPS: 0x00000013 RELENT 8 (bytes) 23 ELF-MIPS: 0x70000001 MIPS_RLD_VERSION 1 24 ELF-MIPS: 0x70000005 MIPS_FLAGS NOTPOT 25 ELF-MIPS: 0x70000006 MIPS_BASE_ADDRESS 0x0 26 ELF-MIPS: 0x7000000A MIPS_LOCAL_GOTNO 10 27 ELF-MIPS: 0x70000011 MIPS_SYMTABNO 19 28 ELF-MIPS: 0x70000012 MIPS_UNREFEXTNO 26 29 ELF-MIPS: 0x70000013 MIPS_GOTSYM 0xD 30 ELF-MIPS: 0x6FFFFFFE VERNEED 0x4E8 31 ELF-MIPS: 0x6FFFFFFF VERNEEDNUM 1 32 ELF-MIPS: 0x6FFFFFF0 VERSYM 0x4C0 33 ELF-MIPS: 0x00000000 NULL 0x0 34 ELF-MIPS: ] 35 36 // Check dynamic section tags in case of non-pic executable file. 37 RUN: llvm-readobj -dynamic-table %p/Inputs/dynamic-table-exe.mips \ 38 RUN: | FileCheck %s -check-prefix ELF-MIPS-EXE 39 40 ELF-MIPS-EXE: Format: ELF32-mips 41 ELF-MIPS-EXE: Arch: mipsel 42 ELF-MIPS-EXE: AddressSize: 32bit 43 ELF-MIPS-EXE: LoadName: 44 ELF-MIPS-EXE: DynamicSection [ (26 entries) 45 ELF-MIPS-EXE: Tag Type Name/Value 46 ELF-MIPS-EXE: 0x00000001 NEEDED SharedLibrary (libc.so.6) 47 ELF-MIPS-EXE: 0x0000000C INIT 0x400418 48 ELF-MIPS-EXE: 0x0000000D FINI 0x4007B0 49 ELF-MIPS-EXE: 0x00000004 HASH 0x4002B8 50 ELF-MIPS-EXE: 0x00000005 STRTAB 0x40036C 51 ELF-MIPS-EXE: 0x00000006 SYMTAB 0x4002EC 52 ELF-MIPS-EXE: 0x0000000A STRSZ 107 (bytes) 53 ELF-MIPS-EXE: 0x0000000B SYMENT 16 (bytes) 54 ELF-MIPS-EXE: 0x70000016 MIPS_RLD_MAP 0x410880 55 ELF-MIPS-EXE: 0x00000015 DEBUG 0x0 56 ELF-MIPS-EXE: 0x00000003 PLTGOT 0x410890 57 ELF-MIPS-EXE: 0x70000001 MIPS_RLD_VERSION 1 58 ELF-MIPS-EXE: 0x70000005 MIPS_FLAGS NOTPOT 59 ELF-MIPS-EXE: 0x70000006 MIPS_BASE_ADDRESS 0x400000 60 ELF-MIPS-EXE: 0x7000000A MIPS_LOCAL_GOTNO 5 61 ELF-MIPS-EXE: 0x70000011 MIPS_SYMTABNO 8 62 ELF-MIPS-EXE: 0x70000012 MIPS_UNREFEXTNO 32 63 ELF-MIPS-EXE: 0x70000013 MIPS_GOTSYM 0x7 64 ELF-MIPS-EXE: 0x00000014 PLTREL REL 65 ELF-MIPS-EXE: 0x00000017 JMPREL 0x400408 66 ELF-MIPS-EXE: 0x00000002 PLTRELSZ 16 (bytes) 67 ELF-MIPS-EXE: 0x70000032 MIPS_PLTGOT 0x410854 68 ELF-MIPS-EXE: 0x6FFFFFFE VERNEED 0x4003E8 69 ELF-MIPS-EXE: 0x6FFFFFFF VERNEEDNUM 1 70 ELF-MIPS-EXE: 0x6FFFFFF0 VERSYM 0x4003D8 71 ELF-MIPS-EXE: 0x00000000 NULL 0x0 72 ELF-MIPS-EXE: ] 73 74 RUN: llvm-readobj -dynamic-table %p/Inputs/dynamic-table-exe.x86 \ 75 RUN: | FileCheck %s -check-prefix ELF-X86-EXE 76 77 ELF-X86-EXE: Format: ELF32-i386 78 ELF-X86-EXE: Arch: i386 79 ELF-X86-EXE: AddressSize: 32bit 80 ELF-X86-EXE: LoadName: 81 ELF-X86-EXE: DynamicSection [ (30 entries) 82 ELF-X86-EXE: Tag Type Name/Value 83 ELF-X86-EXE: 0x00000001 NEEDED SharedLibrary (libstdc++.so.6) 84 ELF-X86-EXE: 0x00000001 NEEDED SharedLibrary (libgcc_s.so.1) 85 ELF-X86-EXE: 0x00000001 NEEDED SharedLibrary (libc.so.6) 86 ELF-X86-EXE: 0x0000000C INIT 0x62C 87 ELF-X86-EXE: 0x0000000D FINI 0x920 88 ELF-X86-EXE: 0x00000019 INIT_ARRAY 0x19FC 89 ELF-X86-EXE: 0x0000001B INIT_ARRAYSZ 4 (bytes) 90 ELF-X86-EXE: 0x0000001A FINI_ARRAY 0x1A00 91 ELF-X86-EXE: 0x0000001C FINI_ARRAYSZ 4 (bytes) 92 ELF-X86-EXE: 0x00000004 HASH 0x18C 93 ELF-X86-EXE: 0x6FFFFEF5 GNU_HASH 0x1E4 94 ELF-X86-EXE: 0x00000005 STRTAB 0x328 95 ELF-X86-EXE: 0x00000006 SYMTAB 0x218 96 ELF-X86-EXE: 0x0000000A STRSZ 408 (bytes) 97 ELF-X86-EXE: 0x0000000B SYMENT 16 (bytes) 98 ELF-X86-EXE: 0x00000015 DEBUG 0x0 99 ELF-X86-EXE: 0x00000003 PLTGOT 0x1B30 100 ELF-X86-EXE: 0x00000002 PLTRELSZ 64 (bytes) 101 ELF-X86-EXE: 0x00000014 PLTREL REL 102 ELF-X86-EXE: 0x00000017 JMPREL 0x5EC 103 ELF-X86-EXE: 0x00000011 REL 0x564 104 ELF-X86-EXE: 0x00000012 RELSZ 136 (bytes) 105 ELF-X86-EXE: 0x00000013 RELENT 8 (bytes) 106 ELF-X86-EXE: 0x00000016 TEXTREL 107 ELF-X86-EXE: 0x0000001E FLAGS TEXTREL 108 ELF-X86-EXE: 0x6FFFFFFE VERNEED 0x4E4 109 ELF-X86-EXE: 0x6FFFFFFF VERNEEDNUM 3 110 ELF-X86-EXE: 0x6FFFFFF0 VERSYM 0x4C0 111 ELF-X86-EXE: 0x6FFFFFFA RELCOUNT 6 112 ELF-X86-EXE: 0x00000000 NULL 0x0 113 ELF-X86-EXE: ] 114