bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/14009] gcc 4.7 conversion to init_array breaks users needi


From: igodard at pacbell dot net
Subject: [Bug binutils/14009] gcc 4.7 conversion to init_array breaks users needing control of C++ static initialization order
Date: Sun, 22 Apr 2012 21:47:00 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=14009

--- Comment #2 from Ivan Godard <igodard at pacbell dot net> 2012-04-22 
21:47:00 UTC ---
I'm likely missing something here but as far as I can tell this won't work.

First, the governing order for execution under init_array is the order of
pointers in the init_array itself; where the point-to sections are in the load
module is irrelevant. Consequently moving the sections does nothing; you'd have
to change the init_array itself and there's no control for that. Based on the
discussions leading to the switch to initarray, a major goal was to be able to
make the init sections physically adjacent to each other for loading speed
(Firefox was mentioned) without perverting the initialization order; hence
order went into the array, and the sections can go anywhere.

Second, nm shows that the init sections are not named with useful names by the
time linker gets them, whereas ctors have names that a script can use.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]