On 06/30/2010 03:46 PM, Dave Korn wrote:
>   Although we could build plugins as Windows DLLs and have GCC load them at
> runtime, if those DLLs needed to refer to anything in the main GCC executable,
> it would have to be specifically linked to import it - and imports on Windows
> have to explicitly specify the name of the DLL (or executable) they are
> imported from.  That means that the plugin would need to explicitly refer to
> cc1.exe or cc1plus.exe, etc; we'd need to build separate versions of the
> plugin for each of the different GCC language compilers.
> 
>   (Long term, we might be able to extend the toolchain and libltdl to
> co-operate to do this kind of deferred runtime linking for us, but that's not
> imminent.)

Long term we could arrange for libbackend.a to become libbackend.dll and
have that library be used for plugins.  The existing practice of linking
back into the main executable is more or less an efficiency hack that
happens to work with ELF.


r~

Reply via email to