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

* Re: XFAIL srec test for powerpc-eabi
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2007-08-02 16:24 UTC (permalink / raw)
  To: binutils

On Thu, Aug 02, 2007 at 10:41:44AM -0400, Daniel Jacobowitz wrote:
> OK to commit?

Actually, OK to commit with powerpc*-*-* instead?  I see the same
failure on GNU/Linux.

-- 
Daniel Jacobowitz
CodeSourcery

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

* Re: XFAIL srec test for powerpc-eabi
  2007-08-02 16:24 ` Daniel Jacobowitz
@ 2007-08-03 11:43   ` Nick Clifton
  2007-08-16  6:14     ` Alan Modra
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Clifton @ 2007-08-03 11:43 UTC (permalink / raw)
  To: binutils

Hi Daniel,

> Actually, OK to commit with powerpc*-*-* instead?  I see the same
> failure on GNU/Linux.

Sure, please do.

Cheers
   Nick


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

* Re: XFAIL srec test for powerpc-eabi
  2007-08-03 11:43   ` Nick Clifton
@ 2007-08-16  6:14     ` Alan Modra
  2007-08-16 11:37       ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Modra @ 2007-08-16  6:14 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils

On Fri, Aug 03, 2007 at 12:43:35PM +0100, Nick Clifton wrote:
> >Actually, OK to commit with powerpc*-*-* instead?  I see the same
> >failure on GNU/Linux.
> 
> Sure, please do.

I don't see failures on powerpc-linux, except now due to an XPASS..
Daniel, this ought to fix the original failure.  Would you mind
checking with your toolchain?

	* ld-srec/srec.exp: Revert 2007-08-03.  Instead pass -G 0.

Index: ld/testsuite/ld-srec/srec.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-srec/srec.exp,v
retrieving revision 1.26
diff -u -p -r1.26 srec.exp
--- ld/testsuite/ld-srec/srec.exp	3 Aug 2007 12:53:47 -0000	1.26
+++ ld/testsuite/ld-srec/srec.exp	16 Aug 2007 01:52:12 -0000
@@ -263,6 +263,11 @@ proc run_srec_test { test objs } {
 	setup_xfail "thumb-*-*"
     }
 
+    # Prevent PowerPC ELF linker putting anything in small data.
+    if [istarget powerpc*-*-*] {
+	set flags "$flags -G 0"
+    }
+
     # PowerPC EABI code calls __eabi.
     if [istarget powerpc*-*-eabi*] {
 	set flags "$flags --defsym __eabi=0"
@@ -374,10 +379,6 @@ setup_xfail "thumb-*-pe*"
 setup_xfail "thumb-*-elf*"
 setup_xfail "arm*-*-linux*"
 
-# The S-record linker doesn't put common symbols in small data
-# the way the ELF linker does.
-setup_xfail "powerpc*-*-*"
-
 # The S-record linker doesn't include the .{zda} sections.
 setup_xfail "v850*-*-elf"
 
-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: XFAIL srec test for powerpc-eabi
  2007-08-16  6:14     ` Alan Modra
@ 2007-08-16 11:37       ` Daniel Jacobowitz
  2007-08-16 13:49         ` Alan Modra
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2007-08-16 11:37 UTC (permalink / raw)
  To: binutils

On Thu, Aug 16, 2007 at 03:44:39PM +0930, Alan Modra wrote:
> On Fri, Aug 03, 2007 at 12:43:35PM +0100, Nick Clifton wrote:
> > >Actually, OK to commit with powerpc*-*-* instead?  I see the same
> > >failure on GNU/Linux.
> > 
> > Sure, please do.
> 
> I don't see failures on powerpc-linux, except now due to an XPASS..
> Daniel, this ought to fix the original failure.  Would you mind
> checking with your toolchain?

What compiler version?  I believe it will only show up with 4.2 or
later; but I'm guessing about the "or later".

> 	* ld-srec/srec.exp: Revert 2007-08-03.  Instead pass -G 0.

Works for me.  Could you also delete the powerpc-*-eabi XFAIL at the
bottom of the file?

-- 
Daniel Jacobowitz
CodeSourcery

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

* Re: XFAIL srec test for powerpc-eabi
  2007-08-16 11:37       ` Daniel Jacobowitz
@ 2007-08-16 13:49         ` Alan Modra
  2007-08-16 13:58           ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Modra @ 2007-08-16 13:49 UTC (permalink / raw)
  To: binutils

On Thu, Aug 16, 2007 at 07:37:48AM -0400, Daniel Jacobowitz wrote:
> On Thu, Aug 16, 2007 at 03:44:39PM +0930, Alan Modra wrote:
> > I don't see failures on powerpc-linux, except now due to an XPASS..
> > Daniel, this ought to fix the original failure.  Would you mind
> > checking with your toolchain?
> 
> What compiler version?  I believe it will only show up with 4.2 or
> later; but I'm guessing about the "or later".

I used 4.3.0 20070815, 4.2.0 20061122, and some older versions.

> > 	* ld-srec/srec.exp: Revert 2007-08-03.  Instead pass -G 0.
> 
> Works for me.  Could you also delete the powerpc-*-eabi XFAIL at the
> bottom of the file?

Done.  This is what I'll commit.

	* ld-srec/srec.exp: Always pass "-G 0".  Remove all powerpc
	xfails.

Index: ld/testsuite/ld-srec/srec.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-srec/srec.exp,v
retrieving revision 1.26
diff -u -p -r1.26 srec.exp
--- ld/testsuite/ld-srec/srec.exp	3 Aug 2007 12:53:47 -0000	1.26
+++ ld/testsuite/ld-srec/srec.exp	16 Aug 2007 13:38:03 -0000
@@ -228,8 +228,9 @@ proc run_srec_test { test objs } {
     global sizeof_headers
     global host_triplet
 
-    # Tell the ELF linker to not do anything clever with .eh_frame.
-    set flags "--traditional-format"
+    # Tell the ELF linker to not do anything clever with .eh_frame,
+    # and not to put anything in small data.
+    set flags "--traditional-format -G 0"
 
     # If the linker script uses SIZEOF_HEADERS, use a -Ttext argument
     # to force both the normal link and the S-record link to be put in
@@ -374,10 +375,6 @@ setup_xfail "thumb-*-pe*"
 setup_xfail "thumb-*-elf*"
 setup_xfail "arm*-*-linux*"
 
-# The S-record linker doesn't put common symbols in small data
-# the way the ELF linker does.
-setup_xfail "powerpc*-*-*"
-
 # The S-record linker doesn't include the .{zda} sections.
 setup_xfail "v850*-*-elf"
 
@@ -420,7 +417,6 @@ setup_xfail "*-*-aix*" "*-*-xcoff*"
 setup_xfail "arm*-*-*"
 setup_xfail "strongarm*-*-*"
 setup_xfail "thumb-*-*"
-setup_xfail "powerpc*-*-eabi*"
 setup_xfail "v850*-*-elf"
 setup_xfail "alpha*-*-elf*" "alpha*-*-linux-*" "alpha*-*-gnu*"
 setup_xfail "alpha*-*-netbsd*"

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: XFAIL srec test for powerpc-eabi
  2007-08-16 13:49         ` Alan Modra
@ 2007-08-16 13:58           ` Daniel Jacobowitz
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2007-08-16 13:58 UTC (permalink / raw)
  To: binutils

On Thu, Aug 16, 2007 at 11:19:20PM +0930, Alan Modra wrote:
> I used 4.3.0 20070815, 4.2.0 20061122, and some older versions.

Weird.  I don't know why it failed for me then; I was using something
based on the 4.2.0 release.  Maybe a local patch was involved.

> Done.  This is what I'll commit.
> 
> 	* ld-srec/srec.exp: Always pass "-G 0".  Remove all powerpc
> 	xfails.

Thanks!

-- 
Daniel Jacobowitz
CodeSourcery

^ 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).