fix Xtensa ld testsuite failures

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

fix Xtensa ld testsuite failures

Bob Wilson
I've committed this patch that H.J. suggested to fix the ld testsuite failures
for Xtensa targets.  It took me a while to figure out that the place_orphan hook
was only being used to work around a problem in a very old version of binutils.
  Linking with -r had been causing the order of orphan sections to be reversed,
which was apparently a problem with an Xtensa port of VxWorks.  I don't know
when that was fixed, but it doesn't happen anymore on mainline.  I verified that
with this patch all the ld tests pass for an xtensa-elf target.

Thanks, H.J.  You saved me more time with this patch than I spent last week
trying to figure out if the failures were expected.  I'm sorry for giving you a
hard time about that.

2005-12-27  H.J. Lu  <[hidden email]>

        * emultempl/xtensaelf.em (elf_xtensa_place_orphan): Delete.
        (LDEMUL_PLACE_ORPHAN): Delete.

Index: ld/emultempl/xtensaelf.em
RCS file: /cvs/src/src/ld/emultempl/xtensaelf.em,v
retrieving revision 1.10
diff -u -r1.10 xtensaelf.em
--- ld/emultempl/xtensaelf.em 17 Nov 2005 00:10:05 -0000 1.10
+++ ld/emultempl/xtensaelf.em 27 Dec 2005 22:50:13 -0000
@@ -58,17 +58,6 @@
-static bfd_boolean
-elf_xtensa_place_orphan (asection *s)
-  /* Early exit for relocatable links.  */
-  if (link_info.relocatable)
-    return FALSE;
-  return gld${EMULATION_NAME}_place_orphan (s);
 static void
 elf_xtensa_before_parse (void)
@@ -1728,6 +1717,5 @@