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 Feb 6, 2013, at 6:23 AM, Alexander Potapenko <glider@google.com> wrote:
> I can't see how full init_priority support can work without proper aid
> from ld and/or the dynamic linker.

I can, but, I don't see that that matters much.  It is a mere matter of software.  Rough sketch, define an encoding of the priority into the object, then define a process by which that data is respected during startup.  The encoding is arbitrary and doesn't much matter.  Once defined, the software to use that encoding is trivial.  The only hanging point is the realization that one needs to hook into the normal startup sequence.  The compiler can do this by having an object in the link that appears first (first to run ctors) that runs all the high priority ctors from its actor.  Now, personally, I favor having the vendor add support first, so that we get a defined abi to adhere to, but that isn't strictly required.  We can drive the abi, by defining it and submitted changes to clang to adhere to it.  Once in and released, I'd not expect the abi to be changed post that, that would then become the de-facto api, and de-jure, once documented.

> According to the Apple people,
> those don't treat the cross-module priorities properly, so there's
> little that can be done on the compiler side.

This is mistaken.


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