[RFA]: Fix ld testsuite for 68HC11/68HC12
Stephane Carrez
Stephane.Carrez@worldnet.fr
Sat Feb 3 07:18:00 GMT 2001
Hi!
In the LD testsuite, the srec and selective tests compile a small program
to link it afterward. For 68HC11, the compiler generates references to
some symbols in libgcc.a. Other platforms resolve this kind of problem
by adding '--defsym undefined=0' options.
Can you approve the patch (trunk+binutils-2_11-branch) below, that adds
the necessary --defsym options for 68HC11?
Thanks,
Stephane
2001-02-03 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* ld-srec/srec.exp (run_srec_test): m6811 code has references
to soft registers, define them with --defsym.
* ld-selective/selective.exp: Likewise.
Index: testsuite/ld-srec/srec.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-srec/srec.exp,v
retrieving revision 1.6
diff -u -r1.6 srec.exp
--- srec.exp 2000/12/31 19:56:04 1.6
+++ srec.exp 2001/02/03 14:05:50
@@ -253,6 +253,13 @@
set flags "$flags --defsym __truncsipsi2_d0_d2=0"
}
+ # m6811/m6812 code has references to soft registers.
+ if {[istarget m6811-*-*] || [istarget m6812-*-*]} {
+ set flags "$flags --defsym _.frame=0 --defsym _.d1=0 --defsym _.d2=0"
+ set flags "$flags --defsym _.d3=0 --defsym _.d4=0"
+ set flags "$flags --defsym _.tmp=0 --defsym _.xy=0"
+ }
+
# V850 targets need libgcc.a
if [istarget v850*-*-elf] {
set objs "$objs -L ../gcc -lgcc"
Index: testsuite/ld-selective/selective.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-selective/selective.exp,v
retrieving revision 1.11
diff -u -r1.11 selective.exp
--- selective.exp 2000/12/09 23:44:17 1.11
+++ selective.exp 2001/02/03 14:05:51
@@ -1,5 +1,5 @@
# Expect script for LD selective linking tests
-# Copyright (C) 1998, 1999, 2000 Free Software Foundation
+# Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -95,6 +95,12 @@
set objfile "$objfile -L ../gcc -lgcc"
}
+ # m6811/m6812 code has references to soft registers.
+ if {[istarget m6811-*-*] || [istarget m6812-*-*]} {
+ set objfile "$objfile --defsym _.frame=0 --defsym _.d1=0"
+ set objfile "$objfile --defsym _.d2=0"
+ }
+
if ![ld_simple_link $ld $ldfile "$ldflags [join $ldargs] $objfile"] {
fail $testname
continue
More information about the Binutils
mailing list