This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [gandalf@winds.org: Trying to figure out a change in latest binutils for linux]
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Fri, 1 Nov 2002 21:11:53 +1030
- Subject: Re: [gandalf@winds.org: Trying to figure out a change in latest binutils for linux]
- References: <20021022144258.A4174@lucon.org> <20021023001425.GF25345@bubble.sa.bigpond.net.au>
On Wed, Oct 23, 2002 at 09:44:25AM +0930, Alan Modra wrote:
> Versions of gas prior to my write.c changes ignored the global
> characteristics of ELF symbols used as subtrahends, treating them as
> local syms. I guess I may need to return to this behaviour for the
> sake of assembly code, since that seems to be the generally expected
> thing.
* write.c (TC_FORCE_RELOCATION_SUB_ABS): Default to zero.
(TC_FORCE_RELOCATION_SUB_LOCAL): Likewise when DIFF_EXPR_OK.
* doc/internals.texi (TC_FORCE_RELOCATION_SUB_ABS): Document changed
default.
Applying.
Index: gas/doc/internals.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/internals.texi,v
retrieving revision 1.30
diff -u -p -r1.30 internals.texi
--- gas/doc/internals.texi 5 Sep 2002 00:01:16 -0000 1.30
+++ gas/doc/internals.texi 1 Nov 2002 10:32:22 -0000
@@ -1304,8 +1304,7 @@ the subtrahend will be resolved and @cod
@item TC_FORCE_RELOCATION_SUB_ABS (@var{fix})
@cindex TC_FORCE_RELOCATION_SUB_ABS
Like @code{TC_FORCE_RELOCATION_SUB_SAME}, but used when the subtrahend is an
-absolute symbol. If the macro is undefined a default of
-@w{@code{(S_FORCE_RELOC ((@var{fix})->fx_subsy))}} is used.
+absolute symbol. If the macro is undefined a default of @code{0} is used.
@item TC_FORCE_RELOCATION_SUB_LOCAL (@var{fix})
@cindex TC_FORCE_RELOCATION_SUB_LOCAL
Index: gas/write.c
===================================================================
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.62
diff -u -p -r1.62 write.c
--- gas/write.c 23 Sep 2002 11:58:00 -0000 1.62
+++ gas/write.c 1 Nov 2002 10:32:17 -0000
@@ -55,16 +55,14 @@
#endif
#ifndef TC_FORCE_RELOCATION_SUB_ABS
-#define TC_FORCE_RELOCATION_SUB_ABS(FIX) \
- (S_FORCE_RELOC ((FIX)->fx_subsy))
+#define TC_FORCE_RELOCATION_SUB_ABS(FIX) 0
#endif
#ifndef TC_FORCE_RELOCATION_SUB_LOCAL
#ifdef DIFF_EXPR_OK
-#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX) \
- (S_FORCE_RELOC ((FIX)->fx_subsy))
+#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX) 0
#else
-#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX) 1
+#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX) 1
#endif
#endif
--
Alan Modra
IBM OzLabs - Linux Technology Centre