This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH]: Fix 2 gas testsuite failures for 68HC11/68HC12
- To: binutils at sources dot redhat dot com
- Subject: [PATCH]: Fix 2 gas testsuite failures for 68HC11/68HC12
- From: Stephane Carrez <Stephane dot Carrez at worldnet dot fr>
- Date: Fri, 02 Feb 2001 14:24:42 +0100
Hi!
When I fixed the weak symbols in 68HC11/68HC12 GAS, I introduced a bug
that causes relaxation to be refused for externally visible symbols.
It was due to the fact that I took the M68K check, and for M68K, the relaxation
must not be made because symbols can be overridden by shared libraries.
Since 68HC11/68HC12 do not have shared libraries, this is not necessary.
I committed the following patch to fix this in the trunk.
I'll try to put it in the binutils-2_11-branch too (if I succeed in knowing
how to do that...).
Stephane
2001-02-02 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* config/tc-m68hc11.c (relaxable_symbol): Relax externally visible
symbols because there is no support for shared libraries and these
symbols can't be overridden (unless they are weak).
Index: config/tc-m68hc11.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68hc11.c,v
retrieving revision 1.12
diff -u -r1.12 tc-m68hc11.c
--- tc-m68hc11.c 2001/01/15 23:09:52 1.12
+++ tc-m68hc11.c 2001/02/02 14:10:32
@@ -2543,14 +2543,15 @@
}
}
-/* On an ELF system, we can't relax an externally visible symbol,
- as well as a weak symbol. The weak symbol can be overriden
- at final link time by a non weak symbol. */
+/* On an ELF system, we can't relax a weak symbol. The weak symbol
+ can be overridden at final link time by a non weak symbol. We can
+ relax externally visible symbol because there is no shared library
+ and such symbol can't be overridden (unless they are weak). */
static int
relaxable_symbol (symbol)
symbolS *symbol;
{
- return ! S_IS_EXTERNAL (symbol) && ! S_IS_WEAK (symbol);
+ return ! S_IS_WEAK (symbol);
}
/* Force truly undefined symbols to their maximum size, and generally set up