This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Remove BFD_RELOC_386_GOT32 in TC_FORCE_RELOCATION_LOCAL
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 23 Sep 2009 22:08:01 -0700
- Subject: Re: PATCH: Remove BFD_RELOC_386_GOT32 in TC_FORCE_RELOCATION_LOCAL
- References: <20090924032140.GA13632@lucon.org>
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
On Wed, Sep 23, 2009 at 08:21:40PM -0700, H.J. Lu wrote:
> Hi,
>
> There is no need to check BFD_RELOC_386_GOT32 in TC_FORCE_RELOCATION_LOCAL
> since GOT32 isn't pcrel.
>
>
> H.J.
> ---
> gas/
>
> 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.
I am checking this patch to make sure that foo is local.
H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog (revision 6953)
+++ ChangeLog (working copy)
@@ -1,5 +1,9 @@
2009-09-23 H.J. Lu <hongjiu.lu@intel.com>
+ * gas/i386/localpic.d: Updated.
+
+2009-09-23 H.J. Lu <hongjiu.lu@intel.com>
+
* gas/i386/i386.exp: Run localpic.
* gas/i386/localpic.d: New.
Index: gas/i386/localpic.d
===================================================================
--- gas/i386/localpic.d (revision 6953)
+++ gas/i386/localpic.d (working copy)
@@ -1,6 +1,9 @@
-#readelf: -r
+#readelf: -rs
#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
+#...
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +foo
+#pass