PATCH: PR ld/12730: regression] crash when allocating in a static constructor
Alan Modra
amodra@gmail.com
Mon May 16 00:15:00 GMT 2011
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.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list