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

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 20 04:53:41 PDT 2016


Author: atanasyan
Date: Sun Mar 20 06:53:39 2016
New Revision: 263897

URL: http://llvm.org/viewvc/llvm-project?rev=263897&view=rev
Log:
[ELF][MIPS] Add case demonstrates creation redundant MIPS GOT entries for non-local symbols. NFC.

Modified:
    lld/trunk/test/ELF/mips-got-redundant.s

Modified: lld/trunk/test/ELF/mips-got-redundant.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-got-redundant.s?rev=263897&r1=263896&r2=263897&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-got-redundant.s (original)
+++ lld/trunk/test/ELF/mips-got-redundant.s Sun Mar 20 06:53:39 2016
@@ -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:




More information about the llvm-commits mailing list