llvm.org GIT mirror llvm / ad720cf
[llvm-readobj] Fix output of MIPS GOT without local and global entries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212374 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Atanasyan 6 years ago
3 changed file(s) with 26 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
55 RUN: FileCheck %s -check-prefix GOT-SO
66 RUN: llvm-readobj -mips-plt-got %p/Inputs/got-tls.so.elf-mips64el | \
77 RUN: FileCheck %s -check-prefix GOT-TLS
8 RUN: llvm-readobj -mips-plt-got %p/Inputs/got-empty.exe.mipsel | \
9 RUN: FileCheck %s -check-prefix GOT-EMPTY
810
911 GOT-OBJ: Cannot find PLTGOT dynamic table tag.
1012
303305 GOT-TLS-NEXT: ]
304306 GOT-TLS-NEXT: Number of TLS and multi-GOT entries: 4
305307 GOT-TLS-NEXT: }
308
309 GOT-EMPTY: Primary GOT {
310 GOT-EMPTY-NEXT: Canonical gp value: 0x409FF0
311 GOT-EMPTY-NEXT: Reserved entries [
312 GOT-EMPTY-NEXT: Entry {
313 GOT-EMPTY-NEXT: Address: 0x402000
314 GOT-EMPTY-NEXT: Access: -32752
315 GOT-EMPTY-NEXT: Initial: 0x0
316 GOT-EMPTY-NEXT: Purpose: Lazy resolver
317 GOT-EMPTY-NEXT: }
318 GOT-EMPTY-NEXT: Entry {
319 GOT-EMPTY-NEXT: Address: 0x402004
320 GOT-EMPTY-NEXT: Access: -32748
321 GOT-EMPTY-NEXT: Initial: 0x80000000
322 GOT-EMPTY-NEXT: Purpose: Module pointer (GNU extension)
323 GOT-EMPTY-NEXT: }
324 GOT-EMPTY-NEXT: ]
325 GOT-EMPTY-NEXT: Local entries [
326 GOT-EMPTY-NEXT: ]
327 GOT-EMPTY-NEXT: Global entries [
328 GOT-EMPTY-NEXT: ]
329 GOT-EMPTY-NEXT: Number of TLS and multi-GOT entries: 2
330 GOT-EMPTY-NEXT: }
10861086 Elf_Sym_Iter DynSymEnd = Obj->end_dynamic_symbols();
10871087 std::size_t DynSymTotal = std::size_t(std::distance(DynSymBegin, DynSymEnd));
10881088
1089 if (DtGotSym + 1 > DynSymTotal) {
1089 if (DtGotSym > DynSymTotal) {
10901090 W.startLine() << "MIPS_GOTSYM exceeds a number of dynamic symbols.\n";
10911091 return;
10921092 }