This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] PR 32130 powerpc-unknown-eabisim build failure (take 3)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>, Rask Ingemann Lambertsen <rask at sygehus dot dk>, Daniel Jacobowitz <drow at false dot org>
- Cc: Michael Meissner <gnu at the-meissners dot org>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 22 Nov 2007 08:55:38 -0500
- Subject: [PATCH] PR 32130 powerpc-unknown-eabisim build failure (take 3)
- References: <20070625184742.GR5690@sygehus.dk> <200706251911.l5PJBXQ29966@makai.watson.ibm.com> <20070625193905.GT5690@sygehus.dk> <200706251941.l5PJf9Q27922@makai.watson.ibm.com> <20070625201459.GU5690@sygehus.dk>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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