This is the mail archive of the gcc@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: Progress on GCC plugins ?


>>>>> "Basile" == Basile STARYNKEVITCH <basile@starynkevitch.net> writes:

Basile> Plugins into GCC are expected to add optimisation passes (see file
Basile> gcc/passes.c function init_optimization_passes and I don't understand
Basile> what exactly LD_PRELOAD trick (unless you also redefine this very
Basile> function init_optimization_passes in your ld_preload-ed plugin) would
Basile> enable this.

FWIW I don't think this is an especially fruitful avenue of
discussion.  Let's take future conversation about LD_PRELOAD off-list.

Basile> So Tom or Taras, could you please elaborate on this? What tricks are
Basile> you thinking of?

I think it isn't extremely hard for a preloaded .so to look up the
pass list and dynamically modify it.

This would be a big hack of course.  I don't really recommend it.

I do wonder if there is a platform out there that acts as if -rdynamic
were the default.  On such a platform you could already write plugins.

Tom


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