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

             Bug #: 14009
           Summary: gcc 4.7 conversion to init_array breaks users needing
                    control of C++ static initialization order
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassig...@sourceware.org
        ReportedBy: igod...@pacbell.net
    Classification: Unclassified


gcc has moved from generating ctors to using init_array; ctors are still
available for a while under option but it's clear that they want to dump ctor
support.

Meanwhile, some of us have been using linker scripts to order the .ctors
sections so as to control initialization order. None of the alternative
solutions (such as "just say no" to statics) you see on the web are usable in
large-scale multi-platform development environments.

Converting to init_array is itself not a problem, but currently gcc/ld appears
to use command line order, so that late-appearing libraries get initialized
first. Unfortunately this is not sufficient when TUs from the same library have
relative ordering requirements with other TUs from the same library.

The scripting facilities need some way to provide fine-gran control of inter-TU
ordering, functionally equivalent to a script with a KEEP list of ctor
sections.

-- 
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.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to