[llvm-commits] [Review request] test: Add the new feature "loadable_module"
NAKAMURA Takumi
geek4civic at gmail.com
Tue Nov 9 18:02:20 PST 2010
Good morning, Rafael.
Thank you to give me comments.
2010/11/10 Rafael EspĂndola <rafael.espindola at gmail.com>:
> I think these patches are fine. Do the generated modules work on
> windows? I had the impression that on windowns plugins could not
> access symbols from the main executable.
"bugpoint -load BugpointPasses" works fine on Cygming.
And I used to build and test my passes as DLL, they worked ;)
Win32 DLL has restrictions (against elf.so)
- "Undefined" symbols are prohibited.
- To import entries, exporter's name (eg. bugpoint.exe) should be known.
In theory, PECOFF executable can export entries.
(unittests/JITTests.exe should do).
Consider bugpoint.exe exported some entries for BugpointPasses.dll.
BugpointPasses.dll would rely on bugpoint.exe and would not
unavailable with opt.exe.
Who would be happy? :)
Usually, when "loadable module" capability is needed on win32,
we can split exporter to the big DLL. eg. perl5*.dll, python2*.dll,
llvm*.dll, &c.
"loadable modules" can depend on those DLLs, not on main executables.
It is why ENABLE_SHARED is needed on win32 to be capable of loadable module.
ps. a few patches will be needed to pass test/bugpoint.
llvm*.dll is not on lib/ but on bin/. for convenience.
...Takumi
More information about the llvm-commits
mailing list