[ELF][MIPS] Add case demonstrates creation redundant MIPS GOT entries for non-local symbols. NFC.

llvm-svn: 263897
This commit is contained in:
Simon Atanasyan 2016-03-20 11:53:39 +00:00
parent 25dde97526
commit 6dd7061d15
1 changed files with 18 additions and 1 deletions

View File

@ -22,13 +22,24 @@
# CHECK-NEXT: Entry {
# CHECK-NEXT: Address: 0x20010
# CHECK-NEXT: Access: -32736
# CHECK-NEXT: Initial: 0x0
# CHECK-NEXT: Initial: 0x40008
# ^-- glb1
# CHECK-NEXT: }
# CHECK-NEXT: Entry {
# CHECK-NEXT: Address: 0x20014
# CHECK-NEXT: Access: -32732
# CHECK-NEXT: Initial: 0x0
# CHECK-NEXT: }
# CHECK-NEXT: Entry {
# CHECK-NEXT: Address: 0x20018
# CHECK-NEXT: Access: -32728
# CHECK-NEXT: Initial: 0x0
# CHECK-NEXT: }
# CHECK-NEXT: Entry {
# CHECK-NEXT: Address: 0x2001C
# CHECK-NEXT: Access: -32724
# CHECK-NEXT: Initial: 0x0
# CHECK-NEXT: }
# CHECK-NEXT: ]
.text
@ -42,6 +53,8 @@ foo:
addi $t0, $t0, %lo(loc3)
lw $t0, %got(loc4)($gp)
addi $t0, $t0, %lo(loc4)
lw $t0, %got(glb1)($gp)
lw $t0, %got(glb1)($gp)
.section .data.1,"aw",%progbits
loc1:
@ -50,6 +63,10 @@ loc2:
.word 0
loc3:
.word 0
.global glb1
.hidden glb1
glb1:
.word 0
.section .data.2,"aw",%progbits
loc4: