This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[PATCH] PR 32130 powerpc-unknown-eabisim build failure (take 3)


Hi!

On Mon, Jun 25, 2007 at 10:14:59PM +0200, Rask Ingemann Lambertsen wrote:
> On Mon, Jun 25, 2007 at 03:41:09PM -0400, David Edelsohn wrote:
> > >>>>> Rask Ingemann Lambertsen writes:
> > 
> > Rask> It would only be good if you could point in the right direction.
> > 
> > 	I don't know either.  I simply would like to be convinced that
> > adding xTOR_LIST2 is the correct fix and not just papering over the
> > problem.
> 
>    Michael, you wrote config/gcc/rs6000/eabi-c[in].asm. Do you remember why
> the rs6000 has its own definitions of __CTOR_LIST__, __CTOR_END__,
> __DTOR_LIST__ and __DTOR_END__ instead of using the ones provided by
> crtstuff.c?

As this issue got stalled for many months and I'm the one who changed
crtstuff.c and made __DTOR_END__ non-static, hidden visibility, what about the
following alternative patch?

Tested just on x86_64-linux by trying to link assembled
        .section ".dtors","aw"
        .globl  __DTOR_END__
        .type   __DTOR_END__,@object
 __DTOR_END__:
resp.
        .section ".dtors","aw"
        .weak   __DTOR_END__
        .type   __DTOR_END__,@object
 __DTOR_END__:
asm snippets into a int main () { return 0; } proglet, as expected
the former doesn't work while the latter does.  Not tested on eabisim,
but it would really surprise me if this didn't work there.
eabi.asm still needs many other __*_END__ symbols from eabi-cn.asm
resp. sol-cn.asm and all the rest of them are non-weak, so omitting
assembled eabi-cn.asm from the link won't unexpectedly succeed.

Rask/Daniel, could you regtest this on powerpc-eabi*?

Ok for trunk if it succeeds?

2007-11-22  Jakub Jelinek  <jakub@redhat.com>

	PR target/32130
	* config/rs6000/eabi-cn.asm (__DTOR_END__): Make it weak.
	* config/rs6000/sol-cn.asm (__DTOR_END__): Likewise.

--- gcc/config/rs6000/eabi-cn.asm.jj	2006-10-05 00:28:33.000000000 +0200
+++ gcc/config/rs6000/eabi-cn.asm	2007-11-22 14:43:06.000000000 +0100
@@ -1,5 +1,5 @@
 /* crtn.s for eabi
-   Copyright (C) 1996, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996, 2000, 2007 Free Software Foundation, Inc.
    Written By Michael Meissner
 
 This file is free software; you can redistribute it and/or modify it
@@ -66,7 +66,7 @@ __FIXUP_END__:
 __CTOR_END__:
 
 	.section ".dtors","aw"
-	.globl	__DTOR_END__
+	.weak	__DTOR_END__
 	.type	__DTOR_END__,@object
 __DTOR_END__:
 
--- gcc/config/rs6000/sol-cn.asm.jj	2006-10-05 00:28:33.000000000 +0200
+++ gcc/config/rs6000/sol-cn.asm	2007-11-22 14:43:27.000000000 +0100
@@ -54,7 +54,7 @@ __CTOR_END__:
 
 # End list of C++ destructors
 	.section ".dtors","aw"
-	.globl	__DTOR_END__
+	.weak	__DTOR_END__
 	.type	__DTOR_END__,@object
 __DTOR_END__:
 


	Jakub


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