public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* XFAIL srec test for powerpc-eabi
@ 2007-08-02 14:41 Daniel Jacobowitz
  2007-08-02 16:24 ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2007-08-02 14:41 UTC (permalink / raw)
  To: binutils

The --oformat srec test has started failing on powerpc-eabi when using
GCC 4.2.  It used to pass for GCC 4.1.  The difference is that GCC 4.1
puts "static int k" in .sbss, and GCC 4.2 puts it in .bss.

I don't quite see why the code in GCC to do that exists, since it
seems sdata would still be a win for the usual reasons.  Less so now
that we have section anchors, but the logic to avoid .sdata predates
those by several years; it just didn't work correctly until recently.
But anyway, it does.

The real problem is that the ELF linker puts common symbols in .sbss
if it can, but the S-record linker does not.  Where we used to end
up with that variable "k" at the beginning of .sbss, it is now in
.sbss.  Things are laid out in the order .sbss, .bss, COMMON.  So if
"k" is in .sbss, the difference between the two linkers has no effect,
since .bss is empty in this testcase.  If it is in .bss, then all the
other variables shuffle four bytes earlier.

OK to commit?

-- 
Daniel Jacobowitz
CodeSourcery

2007-08-02  Daniel Jacobowitz  <dan@codesourcery.com>

	* ld-srec/srec.exp: XFAIL for powerpc*-*-eabi*.

Index: ld/testsuite/ld-srec/srec.exp
===================================================================
--- ld/testsuite/ld-srec/srec.exp	(revision 177794)
+++ ld/testsuite/ld-srec/srec.exp	(working copy)
@@ -371,8 +371,9 @@ setup_xfail "thumb-*-pe*"
 setup_xfail "thumb-*-elf*"
 setup_xfail "arm*-*-linux*"
 
-# The S-record linker doesn't build special EABI sections.
-# setup_xfail "powerpc*-*-eabi*"
+# The S-record linker doesn't put common symbols in small data
+# the way the ELF linker does.
+setup_xfail "powerpc*-*-eabi*"
 
 # The S-record linker doesn't include the .{zda} sections.
 setup_xfail "v850*-*-elf"

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-08-16 13:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-02 14:41 XFAIL srec test for powerpc-eabi Daniel Jacobowitz
2007-08-02 16:24 ` Daniel Jacobowitz
2007-08-03 11:43   ` Nick Clifton
2007-08-16  6:14     ` Alan Modra
2007-08-16 11:37       ` Daniel Jacobowitz
2007-08-16 13:49         ` Alan Modra
2007-08-16 13:58           ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).