[Bug other/46770] Replace .ctors/.dtors with .init_array/.fini_array on targets supporting them
ppluzhnikov at google dot com
gcc-bugzilla@gcc.gnu.org
Wed Apr 18 00:51:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770
--- Comment #90 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2012-04-18 00:50:06 UTC ---
(In reply to comment #89)
> Your solution will reverse order of reference of .init_array entries with
> regards to the linker commandline.
>
> Linking translation units A B C, will result in C B A execution order.
Pardon my confusion ...
AFAIU, before init_array was implemented, the .ctors *were* executed in
C B A order (by the loader).
Are you saying that you've re-ordered the link command line after init_array
became available?
Or that you kept the link command fixed, but switching to init_array gave
you significant speed up, which you don't want to lose?
More information about the Gcc-bugs
mailing list