"Dimitrie O. Paun" dpaun@rogers.com writes:
Yes, having a PE-aware ld.so would allow us to bypass our import mechanism. But I guess the question was: given that we don't have such a ld.so, can we handle import of variables through our current import mechanism?
I don't see how. The compiler will generate references into the ELF GOT so you need to do the fixups there, which is basically what an ELF loader does. What we do for functions is to make the ELF loader link to our version of the function, and then jump to the real one; but of course this cannot work with variables.