This is the mail archive of the
mailing list for the binutils project.
Re: PATCH: PR ld/12730: regression] crash when allocating in a static constructor
- From: Alan Modra <amodra at gmail dot com>
- To: Craig Southeren <craigs at postincrement dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 16 May 2011 09:45:23 +0930
- Subject: Re: PATCH: PR ld/12730: regression] crash when allocating in a static constructor
- References: <4DCFA77B.email@example.com>
On Sun, May 15, 2011 at 08:14:19PM +1000, Craig Southeren wrote:
> At the heart of the issue is the timing of initialising statics at
> the global/namespace level.
You won't get much traction on this issue here on the binutils list.
We did have a ld bug that affected you but that has now been fixed.
Further discussion should go to one of the gcc lists. If you can get
agreement that functions declared with __attribute__ ((constructor))
ought to be treated exactly as standard C++ namespace scope
constructors regarding initialisation order, then it would be good to
have your testcase added to the g++ testsuite. That should ensure
both g++ and ld do not regress.
FWIW, I think your testcase is quite reasonable. The main reason I
wanted the testcase removed from the ld testsuite because I found
the testcase failed using commonly available versions of g++, and
therefore a C++ testcase wasn't the best way to test ld behaviour.
Australia Development Lab, IBM