Benjamin Smedberg wrote:
[...]  getting GCC plugins to work in a Windows host environment could be
very difficult because the Windows PE executable format doesn't support a
DLL importing functions from the primary executable without special export
libraries. This magic is very hard.

It requires some work, but I don't think it deserves to be described as very hard.

*If* you have a list of the function your plug-in requires, then you can automate the process to mark them as exported when compiling the primary executable *and* create the library the plug-in requires.

When the plug-in dll is loaded, the windows loader will see the primary executable is already in the memory space and resolve the function calls.

In fact, with GCC if you change the default for the visibility attribute of function to false, you will get the same situation as under Windows (almost, there's still the fact the windows linker requires an export library, but creating that library from the exe/dll can be automated with proper tools).
_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis

Reply via email to