Ulf Carlsson's patches:
authorAlan Modra <amodra@gmail.com>
Thu, 11 May 2000 01:55:11 +0000 (01:55 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 11 May 2000 01:55:11 +0000 (01:55 +0000)
Include *-*-linux* in svr4pic tests
Test weak symbol handling.

gas/testsuite/ChangeLog
gas/testsuite/gas/mips/jal-svr4pic.d
gas/testsuite/gas/mips/jal-svr4pic.s
gas/testsuite/gas/mips/jal-xgot.d
gas/testsuite/gas/mips/mips.exp

index 6ee57fa4995c90185bd510a272d334c174031230..e121ed4e8e5ee739c32c923c05fbad3e913ee24f 100644 (file)
@@ -1,3 +1,10 @@
+2000-05-11  Ulf Carlsson  <ulfc@engr.sgi.com>
+
+       * gas/mips/mips.exp: Include *-*-linux* in svr4pic.
+
+       * gas/mips/jal-svr4pic.{s,d} gas/mips/jal-xgot.d: Add a jal to a
+       weak symbol.
+
 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
 
        * gas/mri/float.d: Fix for srec length change.
index b15be76248dd1ab3f8dcabadfc99a685944f3dde..6fe868e4f568eb793f86ca9f2608cc070f43e795 100644 (file)
@@ -30,10 +30,17 @@ Disassembly of section .text:
 0+0040 <[^>]*> lw      \$gp,0\(\$sp\)
 0+0044 <[^>]*> nop
 0+0048 <[^>]*> lw      \$t9,0\(\$gp\)
-[      ]*48: R_MIPS_CALL16     external_text_label
+[      ]*48: R_MIPS_CALL16     weak_text_label
 0+004c <[^>]*> nop
 0+0050 <[^>]*> jalr    \$t9
 0+0054 <[^>]*> nop
 0+0058 <[^>]*> lw      \$gp,0\(\$sp\)
-0+005c <[^>]*> b       0+0000 <text_label>
+0+005c <[^>]*> nop
+0+0060 <[^>]*> lw      \$t9,0\(\$gp\)
+[      ]*60: R_MIPS_CALL16     external_text_label
+0+0064 <[^>]*> nop
+0+0068 <[^>]*> jalr    \$t9
+0+006c <[^>]*> nop
+0+0070 <[^>]*> lw      \$gp,0\(\$sp\)
+0+0074 <[^>]*> b       0+0000 <text_label>
        ...
index 9d89dfa50ffd4c78173acf7e47ae04a58e0608a7..1174e9481745dd313f12e8aed034c4b9408c5d87 100644 (file)
@@ -1,5 +1,7 @@
 # Source file used to test the jal macro with -KPIC code.
        
+.weak weak_text_label
+
 text_label:    
        .set    noreorder
        .cpload $25
@@ -8,13 +10,12 @@ text_label:
        jal     $25
        jal     $4,$25
        jal     text_label
+       jal     weak_text_label
        jal     external_text_label
-       
+
 # Test j as well       
        j       text_label
 
 # Round to a 16 byte boundary, for ease in testing multiple targets.
        nop
        nop
-       nop
-       nop
index a26dca38b23c5ed72ec8b57507be0fe3ce10c114..8233ecf8de257be8995b0553a8c813c40d88b9f0 100644 (file)
@@ -30,13 +30,22 @@ Disassembly of section .text:
 0+003c <[^>]*> nop
 0+0040 <[^>]*> lw      \$gp,0\(\$sp\)
 0+0044 <[^>]*> lui     \$t9,0x0
-[      ]*44: R_MIPS_CALL_HI16  external_text_label
+[      ]*44: R_MIPS_CALL_HI16  weak_text_label
 0+0048 <[^>]*> addu    \$t9,\$t9,\$gp
 0+004c <[^>]*> lw      \$t9,0\(\$t9\)
-[      ]*4c: R_MIPS_CALL_LO16  external_text_label
+[      ]*4c: R_MIPS_CALL_LO16  weak_text_label
 0+0050 <[^>]*> nop
 0+0054 <[^>]*> jalr    \$t9
 0+0058 <[^>]*> nop
 0+005c <[^>]*> lw      \$gp,0\(\$sp\)
-0+0060 <[^>]*> b       0+0000 <text_label>
+0+0060 <[^>]*> lui     \$t9,0x0
+[      ]*60: R_MIPS_CALL_HI16  external_text_label
+0+0064 <[^>]*> addu    \$t9,\$t9,\$gp
+0+0068 <[^>]*> lw      \$t9,0\(\$t9\)
+[      ]*68: R_MIPS_CALL_LO16  external_text_label
+0+006c <[^>]*> nop
+0+0070 <[^>]*> jalr    \$t9
+0+0074 <[^>]*> nop
+0+0078 <[^>]*> lw      \$gp,0\(\$sp\)
+0+007c <[^>]*> b       0+0000 <text_label>
        ...
index 6ed1c021fe915475b1aef4a39faf4e6e6ac5dac2..363c8f54f5d306080aa0922a166ef0f65cd5161d 100644 (file)
@@ -3,9 +3,9 @@
 #
 if [istarget mips*-*-*] then {
     set no_mips16 0
-    set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] ]
+    set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] || [istarget *-*-linux*] ]
     set empic [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
-    set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*] || [istarget *-*-openbsd*]]
+    set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*] || [istarget *-*-openbsd*] ]
     set ilocks [istarget mipstx39*-*-*]
     set gpr_ilocks [expr [istarget mipstx39*-*-*]]
     set addr32 [expr [istarget mipstx39*-*-*]]