This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

XFAIL srec test for powerpc-eabi


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"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]