NOCROSSREFS on powerpc64

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

NOCROSSREFS on powerpc64

Alan Modra
        * ld-scripts/crossref.exp: Add a new test for "ld -r".
fails on powerpc64-linux, because there is an indirection via the opd
section between caller section and callee section.  This makes
NOCROSSREFS rather useless on this target, which I doubt anyone cares
about because NOCROSSREFS is mainly aimed at embedded targets using
overlays.  The following hack makes the test pass.

        * ld-scripts/crossref.exp: Add -mcall-aixdesc to CFLAGS for

Index: ld/testsuite/ld-scripts/crossref.exp
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/crossref.exp,v
retrieving revision 1.13
diff -u -p -r1.13 crossref.exp
--- ld/testsuite/ld-scripts/crossref.exp 4 Oct 2005 19:54:08 -0000 1.13
+++ ld/testsuite/ld-scripts/crossref.exp 18 Oct 2005 02:04:01 -0000
@@ -35,6 +35,13 @@ if [istarget xtensa*-*-*] {
     set CFLAGS "$CFLAGS -mtext-section-literals"
+# If we have a compiler that doesn't use/reference dot-symbols, then
+# calls to functions reference the .opd section function descriptor.
+# This makes NOCROSSREFS rather useless on powerpc64.
+if [istarget powerpc64*-*-*] {
+    set CFLAGS "$CFLAGS -mcall-aixdesc"
 if { ![ld_compile $CC "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \
      || ![ld_compile $CC "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } {
     unresolved $test1

Alan Modra
IBM OzLabs - Linux Technology Centre