This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Fix linker cross ref test for MeP
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Wed, 19 Sep 2007 10:22:08 +0100
- Subject: PATCH: Fix linker cross ref test for MeP
Hi Guys,
I am applying the patch below to fix a problem with the linker's
cross reference tests when being run for the MeP target. The
problem was that the compiled test source code used the MeP's small
data area which requires that a special symbol be provided by the
linker script. Since the test scripts do not provide this symbol,
the test case failed to link properly.
The fix is to add the MeP specific compile time option to suppress
the use of the small data area.
Tested by running the linker testsuite for the MeP toolchain.
Cheers
Nick
ld/testsuite/ChangeLog
2007-09-19 Nick Clifton <nickc@redhat.com>
* ld-scripts/crossref.exp: Compile test source with -mtiny=0 in
order to prevent the use of the small data area.
Index: ld/testsuite/ld-scripts/crossref.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/crossref.exp,v
retrieving revision 1.16
diff -c -3 -p -r1.16 crossref.exp
*** ld/testsuite/ld-scripts/crossref.exp 28 Aug 2007 13:21:58 -0000 1.16
--- ld/testsuite/ld-scripts/crossref.exp 19 Sep 2007 09:17:45 -0000
*************** if [istarget powerpc64*-*-*] {
*** 45,50 ****
--- 45,56 ----
set CFLAGS "$CFLAGS -mcall-aixdesc"
}
+ # Prevent the use of the MeP's small data area which references a symbol
+ # called __sdabase which will not be defined by our test linker scripts.
+ if [istarget mep*-*-elf] {
+ set CFLAGS "-mtiny=0"
+ }
+
if { ![ld_compile $CC "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \
|| ![ld_compile $CC "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } {
unresolved $test1