Index: llvm/test/tools/llvm-readobj/ELF/mips-got.test =================================================================== --- llvm/test/tools/llvm-readobj/ELF/mips-got.test +++ llvm/test/tools/llvm-readobj/ELF/mips-got.test @@ -1,486 +1,521 @@ -RUN: llvm-readobj -A %p/Inputs/dynamic-table-exe.mips | \ -RUN: FileCheck %s -check-prefix GOT-EXE -RUN: llvm-readobj -A %p/Inputs/dynamic-table-so.mips | \ -RUN: FileCheck %s -check-prefix GOT-SO -RUN: llvm-readobj -A %p/Inputs/got-tls.so.elf-mips64el | \ -RUN: FileCheck %s -check-prefix GOT-TLS -RUN: llvm-readobj -A %p/Inputs/got-empty.exe.mipsel | \ -RUN: FileCheck %s -check-prefix GOT-EMPTY -RUN: llvm-readobj -A %p/Inputs/got-static.exe.mips | \ -RUN: FileCheck %s -check-prefix GOT-STATIC - -RUN: llvm-readelf -A %p/Inputs/dynamic-table-exe.mips | \ -RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-EXE -RUN: llvm-readelf -A %p/Inputs/dynamic-table-so.mips | \ -RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-SO -RUN: llvm-readelf -A %p/Inputs/got-tls.so.elf-mips64el | \ -RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-TLS -RUN: llvm-readelf -A %p/Inputs/got-empty.exe.mipsel | \ -RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-EMPTY -RUN: llvm-readelf -A %p/Inputs/got-static.exe.mips | \ -RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-STATIC - -GOT-EXE: Primary GOT { -GOT-EXE-NEXT: Canonical gp value: 0x418880 -GOT-EXE-NEXT: Reserved entries [ -GOT-EXE-NEXT: Entry { -GOT-EXE-NEXT: Address: 0x410890 -GOT-EXE-NEXT: Access: -32752 -GOT-EXE-NEXT: Initial: 0x0 -GOT-EXE-NEXT: Purpose: Lazy resolver -GOT-EXE-NEXT: } -GOT-EXE-NEXT: Entry { -GOT-EXE-NEXT: Address: 0x410894 -GOT-EXE-NEXT: Access: -32748 -GOT-EXE-NEXT: Initial: 0x80000000 -GOT-EXE-NEXT: Purpose: Module pointer (GNU extension) -GOT-EXE-NEXT: } -GOT-EXE-NEXT: ] -GOT-EXE-NEXT: Local entries [ -GOT-EXE-NEXT: Entry { -GOT-EXE-NEXT: Address: 0x410898 -GOT-EXE-NEXT: Access: -32744 -GOT-EXE-NEXT: Initial: 0x400418 -GOT-EXE-NEXT: } -GOT-EXE-NEXT: Entry { -GOT-EXE-NEXT: Address: 0x41089C -GOT-EXE-NEXT: Access: -32740 -GOT-EXE-NEXT: Initial: 0x410840 -GOT-EXE-NEXT: } -GOT-EXE-NEXT: Entry { -GOT-EXE-NEXT: Address: 0x4108A0 -GOT-EXE-NEXT: Access: -32736 -GOT-EXE-NEXT: Initial: 0x0 -GOT-EXE-NEXT: } -GOT-EXE-NEXT: ] -GOT-EXE-NEXT: Global entries [ -GOT-EXE-NEXT: Entry { -GOT-EXE-NEXT: Address: 0x4108A4 -GOT-EXE-NEXT: Access: -32732 -GOT-EXE-NEXT: Initial: 0x0 -GOT-EXE-NEXT: Value: 0x0 -GOT-EXE-NEXT: Type: Function (0x2) -GOT-EXE-NEXT: Section: Undefined (0x0) -GOT-EXE-NEXT: Name: __gmon_start__ (1) -GOT-EXE-NEXT: } -GOT-EXE-NEXT: ] -GOT-EXE-NEXT: Number of TLS and multi-GOT entries: 0 -GOT-EXE-NEXT: } - -GOT-SO: Primary GOT { -GOT-SO-NEXT: Canonical gp value: 0x188D0 -GOT-SO-NEXT: Reserved entries [ -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x108E0 -GOT-SO-NEXT: Access: -32752 -GOT-SO-NEXT: Initial: 0x0 -GOT-SO-NEXT: Purpose: Lazy resolver -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x108E4 -GOT-SO-NEXT: Access: -32748 -GOT-SO-NEXT: Initial: 0x80000000 -GOT-SO-NEXT: Purpose: Module pointer (GNU extension) -GOT-SO-NEXT: } -GOT-SO-NEXT: ] -GOT-SO-NEXT: Local entries [ -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x108E8 -GOT-SO-NEXT: Access: -32744 -GOT-SO-NEXT: Initial: 0x108E0 -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x108EC -GOT-SO-NEXT: Access: -32740 -GOT-SO-NEXT: Initial: 0x10000 -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x108F0 -GOT-SO-NEXT: Access: -32736 -GOT-SO-NEXT: Initial: 0x10920 -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x108F4 -GOT-SO-NEXT: Access: -32732 -GOT-SO-NEXT: Initial: 0x108CC -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x108F8 -GOT-SO-NEXT: Access: -32728 -GOT-SO-NEXT: Initial: 0x0 -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x108FC -GOT-SO-NEXT: Access: -32724 -GOT-SO-NEXT: Initial: 0x0 -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x10900 -GOT-SO-NEXT: Access: -32720 -GOT-SO-NEXT: Initial: 0x0 -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x10904 -GOT-SO-NEXT: Access: -32716 -GOT-SO-NEXT: Initial: 0x0 -GOT-SO-NEXT: } -GOT-SO-NEXT: ] -GOT-SO-NEXT: Global entries [ -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x10908 -GOT-SO-NEXT: Access: -32712 -GOT-SO-NEXT: Initial: 0x0 -GOT-SO-NEXT: Value: 0x0 -GOT-SO-NEXT: Type: None (0x0) -GOT-SO-NEXT: Section: Undefined (0x0) -GOT-SO-NEXT: Name: _ITM_registerTMCloneTable (87) -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x1090C -GOT-SO-NEXT: Access: -32708 -GOT-SO-NEXT: Initial: 0x0 -GOT-SO-NEXT: Value: 0x0 -GOT-SO-NEXT: Type: None (0x0) -GOT-SO-NEXT: Section: Undefined (0x0) -GOT-SO-NEXT: Name: _Jv_RegisterClasses (128) -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x10910 -GOT-SO-NEXT: Access: -32704 -GOT-SO-NEXT: Initial: 0x0 -GOT-SO-NEXT: Value: 0x0 -GOT-SO-NEXT: Type: Function (0x2) -GOT-SO-NEXT: Section: Undefined (0x0) -GOT-SO-NEXT: Name: __gmon_start__ (23) -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x10914 -GOT-SO-NEXT: Access: -32700 -GOT-SO-NEXT: Initial: 0x840 -GOT-SO-NEXT: Value: 0x840 -GOT-SO-NEXT: Type: Function (0x2) -GOT-SO-NEXT: Section: Undefined (0x0) -GOT-SO-NEXT: Name: puts@GLIBC_2.0 (162) -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x10918 -GOT-SO-NEXT: Access: -32696 -GOT-SO-NEXT: Initial: 0x0 -GOT-SO-NEXT: Value: 0x0 -GOT-SO-NEXT: Type: None (0x0) -GOT-SO-NEXT: Section: Undefined (0x0) -GOT-SO-NEXT: Name: _ITM_deregisterTMCloneTable (59) -GOT-SO-NEXT: } -GOT-SO-NEXT: Entry { -GOT-SO-NEXT: Address: 0x1091C -GOT-SO-NEXT: Access: -32692 -GOT-SO-NEXT: Initial: 0x0 -GOT-SO-NEXT: Value: 0x0 -GOT-SO-NEXT: Type: Function (0x2) -GOT-SO-NEXT: Section: Undefined (0x0) -GOT-SO-NEXT: Name: __cxa_finalize@GLIBC_2.2 (113) -GOT-SO-NEXT: } -GOT-SO-NEXT: ] -GOT-SO-NEXT: Number of TLS and multi-GOT entries: 0 -GOT-SO-NEXT: } - -GOT-TLS: Primary GOT { -GOT-TLS-NEXT: Canonical gp value: 0x18BF0 -GOT-TLS-NEXT: Reserved entries [ -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C00 -GOT-TLS-NEXT: Access: -32752 -GOT-TLS-NEXT: Initial: 0x0 -GOT-TLS-NEXT: Purpose: Lazy resolver -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C08 -GOT-TLS-NEXT: Access: -32744 -GOT-TLS-NEXT: Initial: 0x8000000000000000 -GOT-TLS-NEXT: Purpose: Module pointer (GNU extension) -GOT-TLS-NEXT: } -GOT-TLS-NEXT: ] -GOT-TLS-NEXT: Local entries [ -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C10 -GOT-TLS-NEXT: Access: -32736 -GOT-TLS-NEXT: Initial: 0x10000 -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C18 -GOT-TLS-NEXT: Access: -32728 -GOT-TLS-NEXT: Initial: 0x10C00 -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C20 -GOT-TLS-NEXT: Access: -32720 -GOT-TLS-NEXT: Initial: 0x10CB8 -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C28 -GOT-TLS-NEXT: Access: -32712 -GOT-TLS-NEXT: Initial: 0x10BF0 -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C30 -GOT-TLS-NEXT: Access: -32704 -GOT-TLS-NEXT: Initial: 0x0 -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C38 -GOT-TLS-NEXT: Access: -32696 -GOT-TLS-NEXT: Initial: 0x948 -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C40 -GOT-TLS-NEXT: Access: -32688 -GOT-TLS-NEXT: Initial: 0xA20 -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C48 -GOT-TLS-NEXT: Access: -32680 -GOT-TLS-NEXT: Initial: 0xAF0 -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C50 -GOT-TLS-NEXT: Access: -32672 -GOT-TLS-NEXT: Initial: 0x0 -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C58 -GOT-TLS-NEXT: Access: -32664 -GOT-TLS-NEXT: Initial: 0x0 -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C60 -GOT-TLS-NEXT: Access: -32656 -GOT-TLS-NEXT: Initial: 0x0 -GOT-TLS-NEXT: } -GOT-TLS-NEXT: ] -GOT-TLS-NEXT: Global entries [ -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C68 -GOT-TLS-NEXT: Access: -32648 -GOT-TLS-NEXT: Initial: 0x0 -GOT-TLS-NEXT: Value: 0x0 -GOT-TLS-NEXT: Type: None (0x0) -GOT-TLS-NEXT: Section: Undefined (0x0) -GOT-TLS-NEXT: Name: _ITM_registerTMCloneTable (78) -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C70 -GOT-TLS-NEXT: Access: -32640 -GOT-TLS-NEXT: Initial: 0x0 -GOT-TLS-NEXT: Value: 0x0 -GOT-TLS-NEXT: Type: None (0x0) -GOT-TLS-NEXT: Section: Undefined (0x0) -GOT-TLS-NEXT: Name: _Jv_RegisterClasses (119) -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C78 -GOT-TLS-NEXT: Access: -32632 -GOT-TLS-NEXT: Initial: 0x0 -GOT-TLS-NEXT: Value: 0x0 -GOT-TLS-NEXT: Type: Function (0x2) -GOT-TLS-NEXT: Section: Undefined (0x0) -GOT-TLS-NEXT: Name: __gmon_start__ (23) -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C80 -GOT-TLS-NEXT: Access: -32624 -GOT-TLS-NEXT: Initial: 0xB60 -GOT-TLS-NEXT: Value: 0xB60 -GOT-TLS-NEXT: Type: Function (0x2) -GOT-TLS-NEXT: Section: Undefined (0x0) -GOT-TLS-NEXT: Name: __tls_get_addr@GLIBC_2.3 (150) -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C88 -GOT-TLS-NEXT: Access: -32616 -GOT-TLS-NEXT: Initial: 0x0 -GOT-TLS-NEXT: Value: 0x0 -GOT-TLS-NEXT: Type: None (0x0) -GOT-TLS-NEXT: Section: Undefined (0x0) -GOT-TLS-NEXT: Name: _ITM_deregisterTMCloneTable (50) -GOT-TLS-NEXT: } -GOT-TLS-NEXT: Entry { -GOT-TLS-NEXT: Address: 0x10C90 -GOT-TLS-NEXT: Access: -32608 -GOT-TLS-NEXT: Initial: 0x0 -GOT-TLS-NEXT: Value: 0x0 -GOT-TLS-NEXT: Type: Function (0x2) -GOT-TLS-NEXT: Section: Undefined (0x0) -GOT-TLS-NEXT: Name: __cxa_finalize@GLIBC_2.2 (104) -GOT-TLS-NEXT: } -GOT-TLS-NEXT: ] -GOT-TLS-NEXT: Number of TLS and multi-GOT entries: 4 -GOT-TLS-NEXT: } - -GOT-EMPTY: Primary GOT { -GOT-EMPTY-NEXT: Canonical gp value: 0x409FF0 -GOT-EMPTY-NEXT: Reserved entries [ -GOT-EMPTY-NEXT: Entry { -GOT-EMPTY-NEXT: Address: 0x402000 -GOT-EMPTY-NEXT: Access: -32752 -GOT-EMPTY-NEXT: Initial: 0x0 -GOT-EMPTY-NEXT: Purpose: Lazy resolver -GOT-EMPTY-NEXT: } -GOT-EMPTY-NEXT: Entry { -GOT-EMPTY-NEXT: Address: 0x402004 -GOT-EMPTY-NEXT: Access: -32748 -GOT-EMPTY-NEXT: Initial: 0x80000000 -GOT-EMPTY-NEXT: Purpose: Module pointer (GNU extension) -GOT-EMPTY-NEXT: } -GOT-EMPTY-NEXT: ] -GOT-EMPTY-NEXT: Local entries [ -GOT-EMPTY-NEXT: ] -GOT-EMPTY-NEXT: Global entries [ -GOT-EMPTY-NEXT: ] -GOT-EMPTY-NEXT: Number of TLS and multi-GOT entries: 2 -GOT-EMPTY-NEXT: } - -GOT-STATIC: Static GOT { -GOT-STATIC-NEXT: Canonical gp value: 0x418100 -GOT-STATIC-NEXT: Reserved entries [ -GOT-STATIC-NEXT: Entry { -GOT-STATIC-NEXT: Address: 0x410110 -GOT-STATIC-NEXT: Access: -32752 -GOT-STATIC-NEXT: Initial: 0x0 -GOT-STATIC-NEXT: Purpose: Lazy resolver -GOT-STATIC-NEXT: } -GOT-STATIC-NEXT: Entry { -GOT-STATIC-NEXT: Address: 0x410114 -GOT-STATIC-NEXT: Access: -32748 -GOT-STATIC-NEXT: Initial: 0x80000000 -GOT-STATIC-NEXT: Purpose: Module pointer (GNU extension) -GOT-STATIC-NEXT: } -GOT-STATIC-NEXT: ] -GOT-STATIC-NEXT: Local entries [ -GOT-STATIC-NEXT: Entry { -GOT-STATIC-NEXT: Address: 0x410118 -GOT-STATIC-NEXT: Access: -32744 -GOT-STATIC-NEXT: Initial: 0x400000 -GOT-STATIC-NEXT: } -GOT-STATIC-NEXT: Entry { -GOT-STATIC-NEXT: Address: 0x41011C -GOT-STATIC-NEXT: Access: -32740 -GOT-STATIC-NEXT: Initial: 0x400100 -GOT-STATIC-NEXT: } -GOT-STATIC-NEXT: Entry { -GOT-STATIC-NEXT: Address: 0x410120 -GOT-STATIC-NEXT: Access: -32736 -GOT-STATIC-NEXT: Initial: 0x400104 -GOT-STATIC-NEXT: } -GOT-STATIC-NEXT: ] -GOT-STATIC-NEXT: } - -GNU-GOT-EXE: Primary GOT: -GNU-GOT-EXE-NEXT: Canonical gp value: 00418880 - -GNU-GOT-EXE: Reserved entries: -GNU-GOT-EXE-NEXT: Address Access Initial Purpose -GNU-GOT-EXE-NEXT: 00410890 -32752(gp) 00000000 Lazy resolver -GNU-GOT-EXE-NEXT: 00410894 -32748(gp) 80000000 Module pointer (GNU extension) - -GNU-GOT-EXE: Local entries: -GNU-GOT-EXE-NEXT: Address Access Initial -GNU-GOT-EXE-NEXT: 00410898 -32744(gp) 00400418 -GNU-GOT-EXE-NEXT: 0041089c -32740(gp) 00410840 -GNU-GOT-EXE-NEXT: 004108a0 -32736(gp) 00000000 - -GNU-GOT-EXE: Global entries: -GNU-GOT-EXE-NEXT: Address Access Initial Sym.Val. Type Ndx Name -GNU-GOT-EXE-NEXT: 004108a4 -32732(gp) 00000000 00000000 FUNC UND __gmon_start__ - -GNU-GOT-EXE: PLT GOT: - -GNU-GOT-EXE: Reserved entries: -GNU-GOT-EXE-NEXT: Address Initial Purpose -GNU-GOT-EXE-NEXT: 00410854 00000000 PLT lazy resolver -GNU-GOT-EXE-NEXT: 00410858 00000000 Module pointer - -GNU-GOT-EXE: Entries: -GNU-GOT-EXE-NEXT: Address Initial Sym.Val. Type Ndx Name -GNU-GOT-EXE-NEXT: 0041085c 00400800 00000000 FUNC UND puts -GNU-GOT-EXE-NEXT: 00410860 00400800 00000000 FUNC UND __libc_start_main - -GNU-GOT-SO: Primary GOT: -GNU-GOT-SO-NEXT: Canonical gp value: 000188d0 - -GNU-GOT-SO: Reserved entries: -GNU-GOT-SO-NEXT: Address Access Initial Purpose -GNU-GOT-SO-NEXT: 000108e0 -32752(gp) 00000000 Lazy resolver -GNU-GOT-SO-NEXT: 000108e4 -32748(gp) 80000000 Module pointer (GNU extension) - -GNU-GOT-SO: Local entries: -GNU-GOT-SO-NEXT: Address Access Initial -GNU-GOT-SO-NEXT: 000108e8 -32744(gp) 000108e0 -GNU-GOT-SO-NEXT: 000108ec -32740(gp) 00010000 -GNU-GOT-SO-NEXT: 000108f0 -32736(gp) 00010920 -GNU-GOT-SO-NEXT: 000108f4 -32732(gp) 000108cc -GNU-GOT-SO-NEXT: 000108f8 -32728(gp) 00000000 -GNU-GOT-SO-NEXT: 000108fc -32724(gp) 00000000 -GNU-GOT-SO-NEXT: 00010900 -32720(gp) 00000000 -GNU-GOT-SO-NEXT: 00010904 -32716(gp) 00000000 - -GNU-GOT-SO: Global entries: -GNU-GOT-SO-NEXT: Address Access Initial Sym.Val. Type Ndx Name -GNU-GOT-SO-NEXT: 00010908 -32712(gp) 00000000 00000000 NOTYPE UND _ITM_registerTMCloneTable -GNU-GOT-SO-NEXT: 0001090c -32708(gp) 00000000 00000000 NOTYPE UND _Jv_RegisterClasses -GNU-GOT-SO-NEXT: 00010910 -32704(gp) 00000000 00000000 FUNC UND __gmon_start__ -GNU-GOT-SO-NEXT: 00010914 -32700(gp) 00000840 00000840 FUNC UND puts -GNU-GOT-SO-NEXT: 00010918 -32696(gp) 00000000 00000000 NOTYPE UND _ITM_deregisterTMCloneTable -GNU-GOT-SO-NEXT: 0001091c -32692(gp) 00000000 00000000 FUNC UND __cxa_finalize - -GNU-GOT-TLS: Primary GOT: -GNU-GOT-TLS-NEXT: Canonical gp value: 0000000000018bf0 - -GNU-GOT-TLS: Reserved entries: -GNU-GOT-TLS-NEXT: Address Access Initial Purpose -GNU-GOT-TLS-NEXT: 0000000000010c00 -32752(gp) 0000000000000000 Lazy resolver -GNU-GOT-TLS-NEXT: 0000000000010c08 -32744(gp) 8000000000000000 Module pointer (GNU extension) - -GNU-GOT-TLS: Local entries: -GNU-GOT-TLS-NEXT: Address Access Initial -GNU-GOT-TLS-NEXT: 0000000000010c10 -32736(gp) 0000000000010000 -GNU-GOT-TLS-NEXT: 0000000000010c18 -32728(gp) 0000000000010c00 -GNU-GOT-TLS-NEXT: 0000000000010c20 -32720(gp) 0000000000010cb8 -GNU-GOT-TLS-NEXT: 0000000000010c28 -32712(gp) 0000000000010bf0 -GNU-GOT-TLS-NEXT: 0000000000010c30 -32704(gp) 0000000000000000 -GNU-GOT-TLS-NEXT: 0000000000010c38 -32696(gp) 0000000000000948 -GNU-GOT-TLS-NEXT: 0000000000010c40 -32688(gp) 0000000000000a20 -GNU-GOT-TLS-NEXT: 0000000000010c48 -32680(gp) 0000000000000af0 -GNU-GOT-TLS-NEXT: 0000000000010c50 -32672(gp) 0000000000000000 -GNU-GOT-TLS-NEXT: 0000000000010c58 -32664(gp) 0000000000000000 -GNU-GOT-TLS-NEXT: 0000000000010c60 -32656(gp) 0000000000000000 - -GNU-GOT-TLS: Global entries: -GNU-GOT-TLS-NEXT: Address Access Initial Sym.Val. Type Ndx Name -GNU-GOT-TLS-NEXT: 0000000000010c68 -32648(gp) 0000000000000000 0000000000000000 NOTYPE UND _ITM_registerTMCloneTable -GNU-GOT-TLS-NEXT: 0000000000010c70 -32640(gp) 0000000000000000 0000000000000000 NOTYPE UND _Jv_RegisterClasses -GNU-GOT-TLS-NEXT: 0000000000010c78 -32632(gp) 0000000000000000 0000000000000000 FUNC UND __gmon_start__ -GNU-GOT-TLS-NEXT: 0000000000010c80 -32624(gp) 0000000000000b60 0000000000000b60 FUNC UND __tls_get_addr -GNU-GOT-TLS-NEXT: 0000000000010c88 -32616(gp) 0000000000000000 0000000000000000 NOTYPE UND _ITM_deregisterTMCloneTable -GNU-GOT-TLS-NEXT: 0000000000010c90 -32608(gp) 0000000000000000 0000000000000000 FUNC UND __cxa_finalize - -GNU-GOTY : Primary GOT: -GNU-GOT-EMPTY: Canonical gp value: 00409ff0 - -GNU-GOTY : Reserved entries: -GNU-GOT-EMPTY: Address Access Initial Purpose -GNU-GOT-EMPTY: 00402000 -32752(gp) 00000000 Lazy resolver -GNU-GOT-EMPTY: 00402004 -32748(gp) 80000000 Module pointer (GNU extension) - -GNU-GOT-STATIC: Static GOT: -GNU-GOT-STATIC-NEXT: Canonical gp value: 00418100 - -GNU-GOT-STATIC: Reserved entries: -GNU-GOT-STATIC-NEXT: Address Access Initial Purpose -GNU-GOT-STATIC-NEXT: 00410110 -32752(gp) 00000000 Lazy resolver -GNU-GOT-STATIC-NEXT: 00410114 -32748(gp) 80000000 Module pointer (GNU extension) - -GNU-GOT-STATIC: Local entries: -GNU-GOT-STATIC-NEXT: Address Access Initial -GNU-GOT-STATIC-NEXT: 00410118 -32744(gp) 00400000 -GNU-GOT-STATIC-NEXT: 0041011c -32740(gp) 00400100 -GNU-GOT-STATIC-NEXT: 00410120 -32736(gp) 00400104 +# RUN: llvm-readobj -A %p/Inputs/dynamic-table-exe.mips | \ +# RUN: FileCheck %s -check-prefix GOT-EXE +# RUN: llvm-readobj -A %p/Inputs/dynamic-table-so.mips | \ +# RUN: FileCheck %s -check-prefix GOT-SO +# RUN: llvm-readobj -A %p/Inputs/got-tls.so.elf-mips64el | \ +# RUN: FileCheck %s -check-prefix GOT-TLS +# RUN: llvm-readobj -A %p/Inputs/got-empty.exe.mipsel | \ +# RUN: FileCheck %s -check-prefix GOT-EMPTY +# RUN: llvm-readobj -A %p/Inputs/got-static.exe.mips | \ +# RUN: FileCheck %s -check-prefix GOT-STATIC + +# RUN: llvm-readelf -A %p/Inputs/dynamic-table-exe.mips | \ +# RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-EXE +# RUN: llvm-readelf -A %p/Inputs/dynamic-table-so.mips | \ +# RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-SO +# RUN: llvm-readelf -A %p/Inputs/got-tls.so.elf-mips64el | \ +# RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-TLS +# RUN: llvm-readelf -A %p/Inputs/got-empty.exe.mipsel | \ +# RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-EMPTY +# RUN: llvm-readelf -A %p/Inputs/got-static.exe.mips | \ +# RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-STATIC + +# GOT-EXE: Primary GOT { +# GOT-EXE-NEXT: Canonical gp value: 0x418880 +# GOT-EXE-NEXT: Reserved entries [ +# GOT-EXE-NEXT: Entry { +# GOT-EXE-NEXT: Address: 0x410890 +# GOT-EXE-NEXT: Access: -32752 +# GOT-EXE-NEXT: Initial: 0x0 +# GOT-EXE-NEXT: Purpose: Lazy resolver +# GOT-EXE-NEXT: } +# GOT-EXE-NEXT: Entry { +# GOT-EXE-NEXT: Address: 0x410894 +# GOT-EXE-NEXT: Access: -32748 +# GOT-EXE-NEXT: Initial: 0x80000000 +# GOT-EXE-NEXT: Purpose: Module pointer (GNU extension) +# GOT-EXE-NEXT: } +# GOT-EXE-NEXT: ] +# GOT-EXE-NEXT: Local entries [ +# GOT-EXE-NEXT: Entry { +# GOT-EXE-NEXT: Address: 0x410898 +# GOT-EXE-NEXT: Access: -32744 +# GOT-EXE-NEXT: Initial: 0x400418 +# GOT-EXE-NEXT: } +# GOT-EXE-NEXT: Entry { +# GOT-EXE-NEXT: Address: 0x41089C +# GOT-EXE-NEXT: Access: -32740 +# GOT-EXE-NEXT: Initial: 0x410840 +# GOT-EXE-NEXT: } +# GOT-EXE-NEXT: Entry { +# GOT-EXE-NEXT: Address: 0x4108A0 +# GOT-EXE-NEXT: Access: -32736 +# GOT-EXE-NEXT: Initial: 0x0 +# GOT-EXE-NEXT: } +# GOT-EXE-NEXT: ] +# GOT-EXE-NEXT: Global entries [ +# GOT-EXE-NEXT: Entry { +# GOT-EXE-NEXT: Address: 0x4108A4 +# GOT-EXE-NEXT: Access: -32732 +# GOT-EXE-NEXT: Initial: 0x0 +# GOT-EXE-NEXT: Value: 0x0 +# GOT-EXE-NEXT: Type: Function (0x2) +# GOT-EXE-NEXT: Section: Undefined (0x0) +# GOT-EXE-NEXT: Name: __gmon_start__ (1) +# GOT-EXE-NEXT: } +# GOT-EXE-NEXT: ] +# GOT-EXE-NEXT: Number of TLS and multi-GOT entries: 0 +# GOT-EXE-NEXT: } + +# GOT-SO: Primary GOT { +# GOT-SO-NEXT: Canonical gp value: 0x188D0 +# GOT-SO-NEXT: Reserved entries [ +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x108E0 +# GOT-SO-NEXT: Access: -32752 +# GOT-SO-NEXT: Initial: 0x0 +# GOT-SO-NEXT: Purpose: Lazy resolver +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x108E4 +# GOT-SO-NEXT: Access: -32748 +# GOT-SO-NEXT: Initial: 0x80000000 +# GOT-SO-NEXT: Purpose: Module pointer (GNU extension) +# GOT-SO-NEXT: } +# GOT-SO-NEXT: ] +# GOT-SO-NEXT: Local entries [ +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x108E8 +# GOT-SO-NEXT: Access: -32744 +# GOT-SO-NEXT: Initial: 0x108E0 +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x108EC +# GOT-SO-NEXT: Access: -32740 +# GOT-SO-NEXT: Initial: 0x10000 +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x108F0 +# GOT-SO-NEXT: Access: -32736 +# GOT-SO-NEXT: Initial: 0x10920 +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x108F4 +# GOT-SO-NEXT: Access: -32732 +# GOT-SO-NEXT: Initial: 0x108CC +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x108F8 +# GOT-SO-NEXT: Access: -32728 +# GOT-SO-NEXT: Initial: 0x0 +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x108FC +# GOT-SO-NEXT: Access: -32724 +# GOT-SO-NEXT: Initial: 0x0 +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x10900 +# GOT-SO-NEXT: Access: -32720 +# GOT-SO-NEXT: Initial: 0x0 +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x10904 +# GOT-SO-NEXT: Access: -32716 +# GOT-SO-NEXT: Initial: 0x0 +# GOT-SO-NEXT: } +# GOT-SO-NEXT: ] +# GOT-SO-NEXT: Global entries [ +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x10908 +# GOT-SO-NEXT: Access: -32712 +# GOT-SO-NEXT: Initial: 0x0 +# GOT-SO-NEXT: Value: 0x0 +# GOT-SO-NEXT: Type: None (0x0) +# GOT-SO-NEXT: Section: Undefined (0x0) +# GOT-SO-NEXT: Name: _ITM_registerTMCloneTable (87) +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x1090C +# GOT-SO-NEXT: Access: -32708 +# GOT-SO-NEXT: Initial: 0x0 +# GOT-SO-NEXT: Value: 0x0 +# GOT-SO-NEXT: Type: None (0x0) +# GOT-SO-NEXT: Section: Undefined (0x0) +# GOT-SO-NEXT: Name: _Jv_RegisterClasses (128) +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x10910 +# GOT-SO-NEXT: Access: -32704 +# GOT-SO-NEXT: Initial: 0x0 +# GOT-SO-NEXT: Value: 0x0 +# GOT-SO-NEXT: Type: Function (0x2) +# GOT-SO-NEXT: Section: Undefined (0x0) +# GOT-SO-NEXT: Name: __gmon_start__ (23) +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x10914 +# GOT-SO-NEXT: Access: -32700 +# GOT-SO-NEXT: Initial: 0x840 +# GOT-SO-NEXT: Value: 0x840 +# GOT-SO-NEXT: Type: Function (0x2) +# GOT-SO-NEXT: Section: Undefined (0x0) +# GOT-SO-NEXT: Name: puts@GLIBC_2.0 (162) +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x10918 +# GOT-SO-NEXT: Access: -32696 +# GOT-SO-NEXT: Initial: 0x0 +# GOT-SO-NEXT: Value: 0x0 +# GOT-SO-NEXT: Type: None (0x0) +# GOT-SO-NEXT: Section: Undefined (0x0) +# GOT-SO-NEXT: Name: _ITM_deregisterTMCloneTable (59) +# GOT-SO-NEXT: } +# GOT-SO-NEXT: Entry { +# GOT-SO-NEXT: Address: 0x1091C +# GOT-SO-NEXT: Access: -32692 +# GOT-SO-NEXT: Initial: 0x0 +# GOT-SO-NEXT: Value: 0x0 +# GOT-SO-NEXT: Type: Function (0x2) +# GOT-SO-NEXT: Section: Undefined (0x0) +# GOT-SO-NEXT: Name: __cxa_finalize@GLIBC_2.2 (113) +# GOT-SO-NEXT: } +# GOT-SO-NEXT: ] +# GOT-SO-NEXT: Number of TLS and multi-GOT entries: 0 +# GOT-SO-NEXT: } + +# GOT-TLS: Primary GOT { +# GOT-TLS-NEXT: Canonical gp value: 0x18BF0 +# GOT-TLS-NEXT: Reserved entries [ +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C00 +# GOT-TLS-NEXT: Access: -32752 +# GOT-TLS-NEXT: Initial: 0x0 +# GOT-TLS-NEXT: Purpose: Lazy resolver +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C08 +# GOT-TLS-NEXT: Access: -32744 +# GOT-TLS-NEXT: Initial: 0x8000000000000000 +# GOT-TLS-NEXT: Purpose: Module pointer (GNU extension) +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: ] +# GOT-TLS-NEXT: Local entries [ +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C10 +# GOT-TLS-NEXT: Access: -32736 +# GOT-TLS-NEXT: Initial: 0x10000 +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C18 +# GOT-TLS-NEXT: Access: -32728 +# GOT-TLS-NEXT: Initial: 0x10C00 +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C20 +# GOT-TLS-NEXT: Access: -32720 +# GOT-TLS-NEXT: Initial: 0x10CB8 +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C28 +# GOT-TLS-NEXT: Access: -32712 +# GOT-TLS-NEXT: Initial: 0x10BF0 +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C30 +# GOT-TLS-NEXT: Access: -32704 +# GOT-TLS-NEXT: Initial: 0x0 +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C38 +# GOT-TLS-NEXT: Access: -32696 +# GOT-TLS-NEXT: Initial: 0x948 +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C40 +# GOT-TLS-NEXT: Access: -32688 +# GOT-TLS-NEXT: Initial: 0xA20 +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C48 +# GOT-TLS-NEXT: Access: -32680 +# GOT-TLS-NEXT: Initial: 0xAF0 +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C50 +# GOT-TLS-NEXT: Access: -32672 +# GOT-TLS-NEXT: Initial: 0x0 +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C58 +# GOT-TLS-NEXT: Access: -32664 +# GOT-TLS-NEXT: Initial: 0x0 +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C60 +# GOT-TLS-NEXT: Access: -32656 +# GOT-TLS-NEXT: Initial: 0x0 +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: ] +# GOT-TLS-NEXT: Global entries [ +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C68 +# GOT-TLS-NEXT: Access: -32648 +# GOT-TLS-NEXT: Initial: 0x0 +# GOT-TLS-NEXT: Value: 0x0 +# GOT-TLS-NEXT: Type: None (0x0) +# GOT-TLS-NEXT: Section: Undefined (0x0) +# GOT-TLS-NEXT: Name: _ITM_registerTMCloneTable (78) +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C70 +# GOT-TLS-NEXT: Access: -32640 +# GOT-TLS-NEXT: Initial: 0x0 +# GOT-TLS-NEXT: Value: 0x0 +# GOT-TLS-NEXT: Type: None (0x0) +# GOT-TLS-NEXT: Section: Undefined (0x0) +# GOT-TLS-NEXT: Name: _Jv_RegisterClasses (119) +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C78 +# GOT-TLS-NEXT: Access: -32632 +# GOT-TLS-NEXT: Initial: 0x0 +# GOT-TLS-NEXT: Value: 0x0 +# GOT-TLS-NEXT: Type: Function (0x2) +# GOT-TLS-NEXT: Section: Undefined (0x0) +# GOT-TLS-NEXT: Name: __gmon_start__ (23) +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C80 +# GOT-TLS-NEXT: Access: -32624 +# GOT-TLS-NEXT: Initial: 0xB60 +# GOT-TLS-NEXT: Value: 0xB60 +# GOT-TLS-NEXT: Type: Function (0x2) +# GOT-TLS-NEXT: Section: Undefined (0x0) +# GOT-TLS-NEXT: Name: __tls_get_addr@GLIBC_2.3 (150) +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C88 +# GOT-TLS-NEXT: Access: -32616 +# GOT-TLS-NEXT: Initial: 0x0 +# GOT-TLS-NEXT: Value: 0x0 +# GOT-TLS-NEXT: Type: None (0x0) +# GOT-TLS-NEXT: Section: Undefined (0x0) +# GOT-TLS-NEXT: Name: _ITM_deregisterTMCloneTable (50) +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: Entry { +# GOT-TLS-NEXT: Address: 0x10C90 +# GOT-TLS-NEXT: Access: -32608 +# GOT-TLS-NEXT: Initial: 0x0 +# GOT-TLS-NEXT: Value: 0x0 +# GOT-TLS-NEXT: Type: Function (0x2) +# GOT-TLS-NEXT: Section: Undefined (0x0) +# GOT-TLS-NEXT: Name: __cxa_finalize@GLIBC_2.2 (104) +# GOT-TLS-NEXT: } +# GOT-TLS-NEXT: ] +# GOT-TLS-NEXT: Number of TLS and multi-GOT entries: 4 +# GOT-TLS-NEXT: } + +# GOT-EMPTY: Primary GOT { +# GOT-EMPTY-NEXT: Canonical gp value: 0x409FF0 +# GOT-EMPTY-NEXT: Reserved entries [ +# GOT-EMPTY-NEXT: Entry { +# GOT-EMPTY-NEXT: Address: 0x402000 +# GOT-EMPTY-NEXT: Access: -32752 +# GOT-EMPTY-NEXT: Initial: 0x0 +# GOT-EMPTY-NEXT: Purpose: Lazy resolver +# GOT-EMPTY-NEXT: } +# GOT-EMPTY-NEXT: Entry { +# GOT-EMPTY-NEXT: Address: 0x402004 +# GOT-EMPTY-NEXT: Access: -32748 +# GOT-EMPTY-NEXT: Initial: 0x80000000 +# GOT-EMPTY-NEXT: Purpose: Module pointer (GNU extension) +# GOT-EMPTY-NEXT: } +# GOT-EMPTY-NEXT: ] +# GOT-EMPTY-NEXT: Local entries [ +# GOT-EMPTY-NEXT: ] +# GOT-EMPTY-NEXT: Global entries [ +# GOT-EMPTY-NEXT: ] +# GOT-EMPTY-NEXT: Number of TLS and multi-GOT entries: 2 +# GOT-EMPTY-NEXT: } + +# GOT-STATIC: Static GOT { +# GOT-STATIC-NEXT: Canonical gp value: 0x418100 +# GOT-STATIC-NEXT: Reserved entries [ +# GOT-STATIC-NEXT: Entry { +# GOT-STATIC-NEXT: Address: 0x410110 +# GOT-STATIC-NEXT: Access: -32752 +# GOT-STATIC-NEXT: Initial: 0x0 +# GOT-STATIC-NEXT: Purpose: Lazy resolver +# GOT-STATIC-NEXT: } +# GOT-STATIC-NEXT: Entry { +# GOT-STATIC-NEXT: Address: 0x410114 +# GOT-STATIC-NEXT: Access: -32748 +# GOT-STATIC-NEXT: Initial: 0x80000000 +# GOT-STATIC-NEXT: Purpose: Module pointer (GNU extension) +# GOT-STATIC-NEXT: } +# GOT-STATIC-NEXT: ] +# GOT-STATIC-NEXT: Local entries [ +# GOT-STATIC-NEXT: Entry { +# GOT-STATIC-NEXT: Address: 0x410118 +# GOT-STATIC-NEXT: Access: -32744 +# GOT-STATIC-NEXT: Initial: 0x400000 +# GOT-STATIC-NEXT: } +# GOT-STATIC-NEXT: Entry { +# GOT-STATIC-NEXT: Address: 0x41011C +# GOT-STATIC-NEXT: Access: -32740 +# GOT-STATIC-NEXT: Initial: 0x400100 +# GOT-STATIC-NEXT: } +# GOT-STATIC-NEXT: Entry { +# GOT-STATIC-NEXT: Address: 0x410120 +# GOT-STATIC-NEXT: Access: -32736 +# GOT-STATIC-NEXT: Initial: 0x400104 +# GOT-STATIC-NEXT: } +# GOT-STATIC-NEXT: ] +# GOT-STATIC-NEXT: } + +# GNU-GOT-EXE: Primary GOT: +# GNU-GOT-EXE-NEXT: Canonical gp value: 00418880 + +# GNU-GOT-EXE: Reserved entries: +# GNU-GOT-EXE-NEXT: Address Access Initial Purpose +# GNU-GOT-EXE-NEXT: 00410890 -32752(gp) 00000000 Lazy resolver +# GNU-GOT-EXE-NEXT: 00410894 -32748(gp) 80000000 Module pointer (GNU extension) + +# GNU-GOT-EXE: Local entries: +# GNU-GOT-EXE-NEXT: Address Access Initial +# GNU-GOT-EXE-NEXT: 00410898 -32744(gp) 00400418 +# GNU-GOT-EXE-NEXT: 0041089c -32740(gp) 00410840 +# GNU-GOT-EXE-NEXT: 004108a0 -32736(gp) 00000000 + +# GNU-GOT-EXE: Global entries: +# GNU-GOT-EXE-NEXT: Address Access Initial Sym.Val. Type Ndx Name +# GNU-GOT-EXE-NEXT: 004108a4 -32732(gp) 00000000 00000000 FUNC UND __gmon_start__ + +# GNU-GOT-EXE: PLT GOT: + +# GNU-GOT-EXE: Reserved entries: +# GNU-GOT-EXE-NEXT: Address Initial Purpose +# GNU-GOT-EXE-NEXT: 00410854 00000000 PLT lazy resolver +# GNU-GOT-EXE-NEXT: 00410858 00000000 Module pointer + +# GNU-GOT-EXE: Entries: +# GNU-GOT-EXE-NEXT: Address Initial Sym.Val. Type Ndx Name +# GNU-GOT-EXE-NEXT: 0041085c 00400800 00000000 FUNC UND puts +# GNU-GOT-EXE-NEXT: 00410860 00400800 00000000 FUNC UND __libc_start_main + +# GNU-GOT-SO: Primary GOT: +# GNU-GOT-SO-NEXT: Canonical gp value: 000188d0 + +# GNU-GOT-SO: Reserved entries: +# GNU-GOT-SO-NEXT: Address Access Initial Purpose +# GNU-GOT-SO-NEXT: 000108e0 -32752(gp) 00000000 Lazy resolver +# GNU-GOT-SO-NEXT: 000108e4 -32748(gp) 80000000 Module pointer (GNU extension) + +# GNU-GOT-SO: Local entries: +# GNU-GOT-SO-NEXT: Address Access Initial +# GNU-GOT-SO-NEXT: 000108e8 -32744(gp) 000108e0 +# GNU-GOT-SO-NEXT: 000108ec -32740(gp) 00010000 +# GNU-GOT-SO-NEXT: 000108f0 -32736(gp) 00010920 +# GNU-GOT-SO-NEXT: 000108f4 -32732(gp) 000108cc +# GNU-GOT-SO-NEXT: 000108f8 -32728(gp) 00000000 +# GNU-GOT-SO-NEXT: 000108fc -32724(gp) 00000000 +# GNU-GOT-SO-NEXT: 00010900 -32720(gp) 00000000 +# GNU-GOT-SO-NEXT: 00010904 -32716(gp) 00000000 + +# GNU-GOT-SO: Global entries: +# GNU-GOT-SO-NEXT: Address Access Initial Sym.Val. Type Ndx Name +# GNU-GOT-SO-NEXT: 00010908 -32712(gp) 00000000 00000000 NOTYPE UND _ITM_registerTMCloneTable +# GNU-GOT-SO-NEXT: 0001090c -32708(gp) 00000000 00000000 NOTYPE UND _Jv_RegisterClasses +# GNU-GOT-SO-NEXT: 00010910 -32704(gp) 00000000 00000000 FUNC UND __gmon_start__ +# GNU-GOT-SO-NEXT: 00010914 -32700(gp) 00000840 00000840 FUNC UND puts +# GNU-GOT-SO-NEXT: 00010918 -32696(gp) 00000000 00000000 NOTYPE UND _ITM_deregisterTMCloneTable +# GNU-GOT-SO-NEXT: 0001091c -32692(gp) 00000000 00000000 FUNC UND __cxa_finalize + +# GNU-GOT-TLS: Primary GOT: +# GNU-GOT-TLS-NEXT: Canonical gp value: 0000000000018bf0 + +# GNU-GOT-TLS: Reserved entries: +# GNU-GOT-TLS-NEXT: Address Access Initial Purpose +# GNU-GOT-TLS-NEXT: 0000000000010c00 -32752(gp) 0000000000000000 Lazy resolver +# GNU-GOT-TLS-NEXT: 0000000000010c08 -32744(gp) 8000000000000000 Module pointer (GNU extension) + +# GNU-GOT-TLS: Local entries: +# GNU-GOT-TLS-NEXT: Address Access Initial +# GNU-GOT-TLS-NEXT: 0000000000010c10 -32736(gp) 0000000000010000 +# GNU-GOT-TLS-NEXT: 0000000000010c18 -32728(gp) 0000000000010c00 +# GNU-GOT-TLS-NEXT: 0000000000010c20 -32720(gp) 0000000000010cb8 +# GNU-GOT-TLS-NEXT: 0000000000010c28 -32712(gp) 0000000000010bf0 +# GNU-GOT-TLS-NEXT: 0000000000010c30 -32704(gp) 0000000000000000 +# GNU-GOT-TLS-NEXT: 0000000000010c38 -32696(gp) 0000000000000948 +# GNU-GOT-TLS-NEXT: 0000000000010c40 -32688(gp) 0000000000000a20 +# GNU-GOT-TLS-NEXT: 0000000000010c48 -32680(gp) 0000000000000af0 +# GNU-GOT-TLS-NEXT: 0000000000010c50 -32672(gp) 0000000000000000 +# GNU-GOT-TLS-NEXT: 0000000000010c58 -32664(gp) 0000000000000000 +# GNU-GOT-TLS-NEXT: 0000000000010c60 -32656(gp) 0000000000000000 + +# GNU-GOT-TLS: Global entries: +# GNU-GOT-TLS-NEXT: Address Access Initial Sym.Val. Type Ndx Name +# GNU-GOT-TLS-NEXT: 0000000000010c68 -32648(gp) 0000000000000000 0000000000000000 NOTYPE UND _ITM_registerTMCloneTable +# GNU-GOT-TLS-NEXT: 0000000000010c70 -32640(gp) 0000000000000000 0000000000000000 NOTYPE UND _Jv_RegisterClasses +# GNU-GOT-TLS-NEXT: 0000000000010c78 -32632(gp) 0000000000000000 0000000000000000 FUNC UND __gmon_start__ +# GNU-GOT-TLS-NEXT: 0000000000010c80 -32624(gp) 0000000000000b60 0000000000000b60 FUNC UND __tls_get_addr +# GNU-GOT-TLS-NEXT: 0000000000010c88 -32616(gp) 0000000000000000 0000000000000000 NOTYPE UND _ITM_deregisterTMCloneTable +# GNU-GOT-TLS-NEXT: 0000000000010c90 -32608(gp) 0000000000000000 0000000000000000 FUNC UND __cxa_finalize + +# GNU-GOTY : Primary GOT: +# GNU-GOT-EMPTY: Canonical gp value: 00409ff0 + +# GNU-GOTY : Reserved entries: +# GNU-GOT-EMPTY: Address Access Initial Purpose +# GNU-GOT-EMPTY: 00402000 -32752(gp) 00000000 Lazy resolver +# GNU-GOT-EMPTY: 00402004 -32748(gp) 80000000 Module pointer (GNU extension) + +# GNU-GOT-STATIC: Static GOT: +# GNU-GOT-STATIC-NEXT: Canonical gp value: 00418100 + +# GNU-GOT-STATIC: Reserved entries: +# GNU-GOT-STATIC-NEXT: Address Access Initial Purpose +# GNU-GOT-STATIC-NEXT: 00410110 -32752(gp) 00000000 Lazy resolver +# GNU-GOT-STATIC-NEXT: 00410114 -32748(gp) 80000000 Module pointer (GNU extension) + +# GNU-GOT-STATIC: Local entries: +# GNU-GOT-STATIC-NEXT: Address Access Initial +# GNU-GOT-STATIC-NEXT: 00410118 -32744(gp) 00400000 +# GNU-GOT-STATIC-NEXT: 0041011c -32740(gp) 00400100 +# GNU-GOT-STATIC-NEXT: 00410120 -32736(gp) 00400104 + +## Check we report errors when dynamic tags, needed for dumping GOT, are missing. + +# RUN: yaml2obj --docnum=1 -DTAG1=DT_MIPS_LOCAL_GOTNO -DTAG2=DT_MIPS_GOTSYM %s -o %t.err1.o +# RUN: not llvm-readobj -A %t.err1.o 2>&1 | FileCheck %s -DFILE=%t.err1.o -check-prefix ERR1 + +# ERR1: error: '[[FILE]]': cannot find PLTGOT dynamic table tag + +# RUN: yaml2obj --docnum=1 -DTAG1=DT_PLTGOT -DTAG2=DT_MIPS_GOTSYM %s -o %t.err2.o +# RUN: not llvm-readobj -A %t.err2.o 2>&1 | FileCheck %s -DFILE=%t.err2.o -check-prefix ERR2 + +# ERR2: error: '[[FILE]]': cannot find MIPS_LOCAL_GOTNO dynamic table tag + +# RUN: yaml2obj --docnum=1 -DTAG1=DT_PLTGOT -DTAG2=DT_MIPS_LOCAL_GOTNO %s -o %t.err3.o +# RUN: not llvm-readobj -A %t.err3.o 2>&1 | FileCheck %s -DFILE=%t.err3.o -check-prefix ERR3 + +# ERR3: error: '[[FILE]]': cannot find MIPS_GOTSYM dynamic table tag + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_MIPS +Sections: + - Name: .dynamic + Type: SHT_DYNAMIC + Entries: + - Tag: [[TAG1]] + Value: 0 + - Tag: [[TAG2]] + Value: 0 + - Tag: DT_NULL + Value: 0 +DynamicSymbols: [] Index: llvm/test/tools/llvm-readobj/ELF/mips-plt.test =================================================================== --- llvm/test/tools/llvm-readobj/ELF/mips-plt.test +++ llvm/test/tools/llvm-readobj/ELF/mips-plt.test @@ -1,64 +1,92 @@ -RUN: llvm-readobj -A %p/Inputs/got-plt.exe.elf-mipsel | FileCheck %s -RUN: llvm-readelf -A %p/Inputs/got-plt.exe.elf-mipsel | FileCheck --check-prefix=GNU %s +# RUN: llvm-readobj -A %p/Inputs/got-plt.exe.elf-mipsel | FileCheck %s +# RUN: llvm-readelf -A %p/Inputs/got-plt.exe.elf-mipsel | FileCheck --check-prefix=GNU %s -CHECK: PLT GOT { -CHECK-NEXT: Reserved entries [ -CHECK-NEXT: Entry { -CHECK-NEXT: Address: 0x410814 -CHECK-NEXT: Initial: 0x0 -CHECK-NEXT: Purpose: PLT lazy resolver -CHECK-NEXT: } -CHECK-NEXT: Entry { -CHECK-NEXT: Address: 0x410818 -CHECK-NEXT: Initial: 0x0 -CHECK-NEXT: Purpose: Module pointer -CHECK-NEXT: } -CHECK-NEXT: ] -CHECK-NEXT: Entries [ -CHECK-NEXT: Entry { -CHECK-NEXT: Address: 0x41081C -CHECK-NEXT: Initial: 0x4007C0 -CHECK-NEXT: Value: 0x0 -CHECK-NEXT: Type: Function (0x2) -CHECK-NEXT: Section: Undefined (0x0) -CHECK-NEXT: Name: puts@GLIBC_2.0 (71) -CHECK-NEXT: } -CHECK-NEXT: Entry { -CHECK-NEXT: Address: 0x410820 -CHECK-NEXT: Initial: 0x4007C0 -CHECK-NEXT: Value: 0x0 -CHECK-NEXT: Type: Function (0x2) -CHECK-NEXT: Section: Undefined (0x0) -CHECK-NEXT: Name: __libc_start_main@GLIBC_2.0 (53) -CHECK-NEXT: } -CHECK-NEXT: ] -CHECK-NEXT: } +# CHECK: PLT GOT { +# CHECK-NEXT: Reserved entries [ +# CHECK-NEXT: Entry { +# CHECK-NEXT: Address: 0x410814 +# CHECK-NEXT: Initial: 0x0 +# CHECK-NEXT: Purpose: PLT lazy resolver +# CHECK-NEXT: } +# CHECK-NEXT: Entry { +# CHECK-NEXT: Address: 0x410818 +# CHECK-NEXT: Initial: 0x0 +# CHECK-NEXT: Purpose: Module pointer +# CHECK-NEXT: } +# CHECK-NEXT: ] +# CHECK-NEXT: Entries [ +# CHECK-NEXT: Entry { +# CHECK-NEXT: Address: 0x41081C +# CHECK-NEXT: Initial: 0x4007C0 +# CHECK-NEXT: Value: 0x0 +# CHECK-NEXT: Type: Function (0x2) +# CHECK-NEXT: Section: Undefined (0x0) +# CHECK-NEXT: Name: puts@GLIBC_2.0 (71) +# CHECK-NEXT: } +# CHECK-NEXT: Entry { +# CHECK-NEXT: Address: 0x410820 +# CHECK-NEXT: Initial: 0x4007C0 +# CHECK-NEXT: Value: 0x0 +# CHECK-NEXT: Type: Function (0x2) +# CHECK-NEXT: Section: Undefined (0x0) +# CHECK-NEXT: Name: __libc_start_main@GLIBC_2.0 (53) +# CHECK-NEXT: } +# CHECK-NEXT: ] +# CHECK-NEXT: } -GNU: Primary GOT: -GNU-NEXT: Canonical gp value: 00418840 +# GNU: Primary GOT: +# GNU-NEXT: Canonical gp value: 00418840 -GNU: Reserved entries: -GNU-NEXT: Address Access Initial Purpose -GNU-NEXT: 00410850 -32752(gp) 00000000 Lazy resolver -GNU-NEXT: 00410854 -32748(gp) 80000000 Module pointer (GNU extension) +# GNU: Reserved entries: +# GNU-NEXT: Address Access Initial Purpose +# GNU-NEXT: 00410850 -32752(gp) 00000000 Lazy resolver +# GNU-NEXT: 00410854 -32748(gp) 80000000 Module pointer (GNU extension) -GNU: Local entries: -GNU-NEXT: Address Access Initial -GNU-NEXT: 00410858 -32744(gp) 004003d4 -GNU-NEXT: 0041085c -32740(gp) 00410800 -GNU-NEXT: 00410860 -32736(gp) 00000000 +# GNU: Local entries: +# GNU-NEXT: Address Access Initial +# GNU-NEXT: 00410858 -32744(gp) 004003d4 +# GNU-NEXT: 0041085c -32740(gp) 00410800 +# GNU-NEXT: 00410860 -32736(gp) 00000000 -GNU: Global entries: -GNU-NEXT: Address Access Initial Sym.Val. Type Ndx Name -GNU-NEXT: 00410864 -32732(gp) 00000000 00000000 FUNC UND __gmon_start__ -GNU-NEXT: PLT GOT: +# GNU: Global entries: +# GNU-NEXT: Address Access Initial Sym.Val. Type Ndx Name +# GNU-NEXT: 00410864 -32732(gp) 00000000 00000000 FUNC UND __gmon_start__ +# GNU-NEXT: PLT GOT: -GNU: Reserved entries: -GNU-NEXT: Address Initial Purpose -GNU-NEXT: 00410814 00000000 PLT lazy resolver -GNU-NEXT: 00410818 00000000 Module pointer +# GNU: Reserved entries: +# GNU-NEXT: Address Initial Purpose +# GNU-NEXT: 00410814 00000000 PLT lazy resolver +# GNU-NEXT: 00410818 00000000 Module pointer -GNU: Entries: -GNU-NEXT: Address Initial Sym.Val. Type Ndx Name -GNU-NEXT: 0041081c 004007c0 00000000 FUNC UND puts -GNU-NEXT: 00410820 004007c0 00000000 FUNC UND __libc_start_main +# GNU: Entries: +# GNU-NEXT: Address Initial Sym.Val. Type Ndx Name +# GNU-NEXT: 0041081c 004007c0 00000000 FUNC UND puts +# GNU-NEXT: 00410820 004007c0 00000000 FUNC UND __libc_start_main + +## Check we report errors when dynamic tags, needed for dumping PLT, are missing. + +# RUN: yaml2obj --docnum=1 -DTAG=DT_MIPS_PLTGOT %s -o %t.err1.o +# RUN: not llvm-readobj -A %t.err1.o 2>&1 | FileCheck %s -DFILE=%t.err1.o --check-prefix=ERR1 + +# ERR1: error: '[[FILE]]': cannot find JMPREL dynamic table tag + +# RUN: yaml2obj --docnum=1 -DTAG=DT_JMPREL %s -o %t.err2.o +# RUN: not llvm-readobj -A %t.err2.o 2>&1 | FileCheck %s -DFILE=%t.err2.o --check-prefix=ERR2 + +# ERR2: error: '[[FILE]]': cannot find MIPS_PLTGOT dynamic table tag + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_MIPS +Sections: + - Name: .dynamic + Type: SHT_DYNAMIC + Entries: + - Tag: [[TAG]] + Value: 0 + - Tag: DT_NULL + Value: 0 +DynamicSymbols: [] Index: llvm/tools/llvm-readobj/ELFDumper.cpp =================================================================== --- llvm/tools/llvm-readobj/ELFDumper.cpp +++ llvm/tools/llvm-readobj/ELFDumper.cpp @@ -2855,9 +2855,14 @@ MipsGOTParser Parser(Obj, ObjF->getFileName(), dynamic_table(), dynamic_symbols()); - if (Parser.hasGot()) + if (Error E = Parser.findGOT(dynamic_table(), dynamic_symbols())) + reportError(std::move(E), ObjF->getFileName()); + else if (!Parser.isGotEmpty()) ELFDumperStyle->printMipsGOT(Parser); - if (Parser.hasPlt()) + + if (Error E = Parser.findPLT(dynamic_table())) + reportError(std::move(E), ObjF->getFileName()); + else if (!Parser.isPltEmpty()) ELFDumperStyle->printMipsPLT(Parser); break; } @@ -2919,9 +2924,11 @@ MipsGOTParser(const ELFO *Obj, StringRef FileName, Elf_Dyn_Range DynTable, Elf_Sym_Range DynSyms); + Error findGOT(Elf_Dyn_Range DynTable, Elf_Sym_Range DynSyms); + Error findPLT(Elf_Dyn_Range DynTable); - bool hasGot() const { return !GotEntries.empty(); } - bool hasPlt() const { return !PltEntries.empty(); } + bool isGotEmpty() const { return GotEntries.empty(); } + bool isPltEmpty() const { return PltEntries.empty(); } uint64_t getGp() const; @@ -2969,7 +2976,11 @@ Elf_Sym_Range DynSyms) : IsStatic(DynTable.empty()), Obj(Obj), GotSec(nullptr), LocalNum(0), GlobalNum(0), PltSec(nullptr), PltRelSec(nullptr), PltSymTable(nullptr), - FileName(FileName) { + FileName(FileName) {} + +template +Error MipsGOTParser::findGOT(Elf_Dyn_Range DynTable, + Elf_Sym_Range DynSyms) { // See "Global Offset Table" in Chapter 5 in the following document // for detailed GOT description. // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf @@ -2978,22 +2989,20 @@ if (IsStatic) { GotSec = findSectionByName(*Obj, FileName, ".got"); if (!GotSec) - return; + return Error::success(); ArrayRef Content = unwrapOrError(FileName, Obj->getSectionContents(GotSec)); GotEntries = Entries(reinterpret_cast(Content.data()), Content.size() / sizeof(Entry)); LocalNum = GotEntries.size(); - return; + return Error::success(); } - // Lookup dynamic table tags which define GOT/PLT layouts. + // Lookup dynamic table tags which define the GOT layout. Optional DtPltGot; Optional DtLocalGotNum; Optional DtGotSym; - Optional DtMipsPltGot; - Optional DtJmpRel; for (const auto &Entry : DynTable) { switch (Entry.getTag()) { case ELF::DT_PLTGOT: @@ -3005,6 +3014,47 @@ case ELF::DT_MIPS_GOTSYM: DtGotSym = Entry.getVal(); break; + } + } + + if (!DtPltGot && !DtLocalGotNum && !DtGotSym) + return Error::success(); + + if (!DtPltGot) + return createError("cannot find PLTGOT dynamic table tag"); + if (!DtLocalGotNum) + return createError("cannot find MIPS_LOCAL_GOTNO dynamic table tag"); + if (!DtGotSym) + return createError("cannot find MIPS_GOTSYM dynamic table tag"); + + size_t DynSymTotal = DynSyms.size(); + if (*DtGotSym > DynSymTotal) + return createError("MIPS_GOTSYM exceeds a number of dynamic symbols"); + + GotSec = findNotEmptySectionByAddress(Obj, FileName, *DtPltGot); + if (!GotSec) + return createError("there is no not empty GOT section at 0x" + + Twine::utohexstr(*DtPltGot)); + + LocalNum = *DtLocalGotNum; + GlobalNum = DynSymTotal - *DtGotSym; + + ArrayRef Content = + unwrapOrError(FileName, Obj->getSectionContents(GotSec)); + GotEntries = Entries(reinterpret_cast(Content.data()), + Content.size() / sizeof(Entry)); + GotDynSyms = DynSyms.drop_front(*DtGotSym); + + return Error::success(); +} + +template +Error MipsGOTParser::findPLT(Elf_Dyn_Range DynTable) { + // Lookup dynamic table tags which define the PLT layout. + Optional DtMipsPltGot; + Optional DtJmpRel; + for (const auto &Entry : DynTable) { + switch (Entry.getTag()) { case ELF::DT_MIPS_PLTGOT: DtMipsPltGot = Entry.getVal(); break; @@ -3014,63 +3064,35 @@ } } - // Find dynamic GOT section. - if (DtPltGot || DtLocalGotNum || DtGotSym) { - if (!DtPltGot) - report_fatal_error("Cannot find PLTGOT dynamic table tag."); - if (!DtLocalGotNum) - report_fatal_error("Cannot find MIPS_LOCAL_GOTNO dynamic table tag."); - if (!DtGotSym) - report_fatal_error("Cannot find MIPS_GOTSYM dynamic table tag."); - - size_t DynSymTotal = DynSyms.size(); - if (*DtGotSym > DynSymTotal) - reportError( - createError("MIPS_GOTSYM exceeds a number of dynamic symbols"), - FileName); - - GotSec = findNotEmptySectionByAddress(Obj, FileName, *DtPltGot); - if (!GotSec) - reportError(createError("There is no not empty GOT section at 0x" + - Twine::utohexstr(*DtPltGot)), - FileName); - - LocalNum = *DtLocalGotNum; - GlobalNum = DynSymTotal - *DtGotSym; - - ArrayRef Content = - unwrapOrError(FileName, Obj->getSectionContents(GotSec)); - GotEntries = Entries(reinterpret_cast(Content.data()), - Content.size() / sizeof(Entry)); - GotDynSyms = DynSyms.drop_front(*DtGotSym); - } + if (!DtMipsPltGot && !DtJmpRel) + return Error::success(); // Find PLT section. - if (DtMipsPltGot || DtJmpRel) { - if (!DtMipsPltGot) - report_fatal_error("Cannot find MIPS_PLTGOT dynamic table tag."); - if (!DtJmpRel) - report_fatal_error("Cannot find JMPREL dynamic table tag."); - - PltSec = findNotEmptySectionByAddress(Obj, FileName, * DtMipsPltGot); - if (!PltSec) - report_fatal_error("There is no not empty PLTGOT section at 0x " + - Twine::utohexstr(*DtMipsPltGot)); - - PltRelSec = findNotEmptySectionByAddress(Obj, FileName, * DtJmpRel); - if (!PltRelSec) - report_fatal_error("There is no not empty RELPLT section at 0x" + - Twine::utohexstr(*DtJmpRel)); - - ArrayRef PltContent = - unwrapOrError(FileName, Obj->getSectionContents(PltSec)); - PltEntries = Entries(reinterpret_cast(PltContent.data()), - PltContent.size() / sizeof(Entry)); - - PltSymTable = unwrapOrError(FileName, Obj->getSection(PltRelSec->sh_link)); - PltStrTable = - unwrapOrError(FileName, Obj->getStringTableForSymtab(*PltSymTable)); - } + if (!DtMipsPltGot) + return createError("cannot find MIPS_PLTGOT dynamic table tag"); + if (!DtJmpRel) + return createError("cannot find JMPREL dynamic table tag"); + + PltSec = findNotEmptySectionByAddress(Obj, FileName, *DtMipsPltGot); + if (!PltSec) + return createError("There is no not empty PLTGOT section at 0x " + + Twine::utohexstr(*DtMipsPltGot)); + + PltRelSec = findNotEmptySectionByAddress(Obj, FileName, *DtJmpRel); + if (!PltRelSec) + return createError("There is no not empty RELPLT section at 0x" + + Twine::utohexstr(*DtJmpRel)); + + ArrayRef PltContent = + unwrapOrError(FileName, Obj->getSectionContents(PltSec)); + PltEntries = Entries(reinterpret_cast(PltContent.data()), + PltContent.size() / sizeof(Entry)); + + PltSymTable = unwrapOrError(FileName, Obj->getSection(PltRelSec->sh_link)); + PltStrTable = + unwrapOrError(FileName, Obj->getStringTableForSymtab(*PltSymTable)); + + return Error::success(); } template uint64_t MipsGOTParser::getGp() const {