gas/
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Sep 2009 03:23:52 +0000 (03:23 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Sep 2009 03:23:52 +0000 (03:23 +0000)
2009-09-23  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.h (TC_FORCE_RELOCATION_LOCAL): Don't check
BFD_RELOC_386_GOT32.

gas/testsuite/

2009-09-23  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/i386.exp: Run localpic.

* gas/i386/localpic.d: New.
* gas/i386/localpic.s: Likewise.

gas/ChangeLog
gas/config/tc-i386.h
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/localpic.d [new file with mode: 0644]
gas/testsuite/gas/i386/localpic.s [new file with mode: 0644]

index 35bda3de2f4163470a004e77d12b0c9e423199bb..b0f8b85a4a1ede393af92a823dea068153d063df 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/tc-i386.h (TC_FORCE_RELOCATION_LOCAL): Don't check
+       BFD_RELOC_386_GOT32.
+
 2009-09-23  Sterling Augustine  <sterling@jaw.hq.tensilica.com>
 
        * config/tc-xtensa.c (md_apply_fix): Remove check for constant with
index 9b9bc61e157567e944e2306cdc74a94ae386656e..ab7cbf2a265bcda3bbdedf52200e521653782774 100644 (file)
@@ -149,14 +149,12 @@ extern int tc_i386_fix_adjustable (struct fix *);
 /* This expression evaluates to true if the relocation is for a local
    object for which we still want to do the relocation at runtime.
    False if we are willing to perform this relocation while building
-   the .o file.  GOTOFF does not need to be checked here because it is
-   not pcrel.  I am not sure if some of the others are ever used with
-   pcrel, but it is easier to be safe than sorry.  */
+   the .o file.  GOTOFF and GOT32 do not need to be checked here because 
+   they are not pcrel.  .*/
 
 #define TC_FORCE_RELOCATION_LOCAL(FIX)                 \
   (!(FIX)->fx_pcrel                                    \
    || (FIX)->fx_r_type == BFD_RELOC_386_PLT32          \
-   || (FIX)->fx_r_type == BFD_RELOC_386_GOT32          \
    || (FIX)->fx_r_type == BFD_RELOC_386_GOTPC          \
    || TC_FORCE_RELOCATION (FIX))
 
index 16036ff517425784b46fb6685ac59301d00c9948..cd0dd742d8530e53aa386ec21a240cf6f5c62366 100644 (file)
@@ -1,3 +1,10 @@
+2009-09-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * gas/i386/i386.exp: Run localpic.
+
+       * gas/i386/localpic.d: New.
+       * gas/i386/localpic.s: Likewise.
+
 2009-09-23  Alan Modra  <amodra@bigpond.net.au>
 
        * gas/arm/thumbver.d: Tolerate some whitespace differences.
index 58e31dae8625c7ff850e39f5bf5f6240020fdd11..2196575e4f8ff4f910a4a2d897f6efd34cdaca03 100644 (file)
@@ -192,6 +192,7 @@ if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]
        run_list_test "inval-equ-2" "-al"
        run_dump_test "ifunc"
        run_list_test "l1om-inval" "-march=l1om --32"
+       run_dump_test "localpic"
     }
 
     # This is a PE specific test.
diff --git a/gas/testsuite/gas/i386/localpic.d b/gas/testsuite/gas/i386/localpic.d
new file mode 100644 (file)
index 0000000..bda8665
--- /dev/null
@@ -0,0 +1,6 @@
+#readelf: -r
+#name: i386 local PIC
+
+Relocation section '.rel.text' at offset 0x[0-9a-f]+ contains 1 entries:
+ Offset     Info    Type            Sym.Value  Sym. Name
+[0-9a-f]+ +[0-9a-f]+ R_386_GOT32 +[0-9a-f]+ +foo
diff --git a/gas/testsuite/gas/i386/localpic.s b/gas/testsuite/gas/i386/localpic.s
new file mode 100644 (file)
index 0000000..e633944
--- /dev/null
@@ -0,0 +1,5 @@
+       .data
+foo:
+       .long 0
+       .text
+movl   foo@GOT(%ecx), %eax
This page took 0.033784 seconds and 4 git commands to generate.