This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fix PR sanitizer/55617


On Wed, Feb 06, 2013 at 07:36:06AM -0800, Ian Lance Taylor wrote:
> On Wed, Feb 6, 2013 at 7:14 AM, Alexander Potapenko <glider@google.com> wrote:
> >
> > I understand and fully support your desire for intra-module ctor/dtor priority.
> > My comment was meant to reply to Mike (sorry for top-posting it,
> > again), who, as far as I understood him, wanted to see full
> > init_priority support on Darwin, which IIUC can't be implemented
> > without the proper linker support. LTO may help as a bandaid, but I
> > don't think this solution scales well enough yet.
> 
> It could be done using collect2.  Though it would be a bit tedious to write.

Ian,
    Don't you need assembler support for the constructor init priorities to be
called in the correct order when they reside in static or shared libraries?
I couldn't puzzle out how collect2 can help with that issue.
            Jack

> 
> Or it could perhaps be done via a linker plugin--the Darwin linker
> supports plugins.  I don't know if the Darwin linker has the required
> plugin support, but the gold linker does.
> 
> Or we could just bug the Darwin guys to support it in the linker, it's
> clearly a useful feature, and they do have linker support.
> 
> Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]