brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 86289b9 Raw
51 lines · plain
1# REQUIRES: mips2# Check the primary GOT cannot be made to overflow3 4# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \5# RUN:         %p/Inputs/mips-64-got-load.s -o %t1.so.o6# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t2.so.o7# RUN: ld.lld -shared -mips-got-size 32 %t1.so.o %t2.so.o -o %t-sgot.so8# RUN: ld.lld -shared -mips-got-size 24 %t1.so.o %t2.so.o -o %t-mgot.so9# RUN: llvm-readelf -s -A %t-sgot.so | FileCheck -check-prefixes=SYM,SGOT %s10# RUN: llvm-readelf -s -A %t-mgot.so | FileCheck -check-prefixes=SYM,MGOT %s11 12# SYM: Symbol table '.symtab'13# SYM: {{.*}}: [[LOC1:[0-9a-f]+]]  {{.*}} local114# SYM: {{.*}}: [[LOC2:[0-9a-f]+]]  {{.*}} local215 16# SGOT:      Primary GOT:17# SGOT-NEXT:  Canonical gp value:18# SGOT-EMPTY:19# SGOT-NEXT:  Reserved entries:20# SGOT-NEXT:  Address     Access          Initial Purpose21# SGOT-NEXT:   {{.*}} -32752(gp) 0000000000000000 Lazy resolver22# SGOT-NEXT:   {{.*}} -32744(gp) 8000000000000000 Module pointer (GNU extension)23# SGOT-EMPTY:24# SGOT-NEXT:  Local entries:25# SGOT-NEXT:  Address     Access          Initial26# SGOT-NEXT:   {{.*}} -32736(gp) [[LOC1]]27# SGOT-NEXT:   {{.*}} -32728(gp) [[LOC2]]28 29# MGOT:      Primary GOT:30# MGOT-NEXT:  Canonical gp value:31# MGOT-EMPTY:32# MGOT-NEXT:  Reserved entries:33# MGOT-NEXT:  Address     Access          Initial Purpose34# MGOT-NEXT:   {{.*}} -32752(gp) 0000000000000000 Lazy resolver35# MGOT-NEXT:   {{.*}} -32744(gp) 8000000000000000 Module pointer (GNU extension)36# MGOT-EMPTY:37# MGOT-NEXT:  Local entries:38# MGOT-NEXT:  Address     Access          Initial39# MGOT-NEXT:   {{.*}} -32736(gp) [[LOC1]]40# MGOT-EMPTY:41# MGOT-NEXT:  Number of TLS and multi-GOT entries 142 43  .text44  .global foo245foo2:46  ld $2, %got_disp(local2)($gp)47 48  .bss49local2:50  .word 051