Closed stsp closed 5 months ago
Hmm, seems impossible. :( man page says:
Another use is to load the same object more than once. With‐
out the use of dlmopen(), this would require the creation of distinct
copies of the shared object file.
But even the distinct copies do not
help unless the one copies also entire
libdj64.so.0.2
...
But with that we are back to
linux-only, as no one provides
dlmopen()
...
That seems to really suck!
I can use static linking.
comcom64.exe
size then increases
from 315K to 1.2M. Stripped version
increases from 140K to 425K.
So... perhaps I need to support both static and dynamic linking, supporting only static linking on non-GNU systems... :(
Static linking implemented. Oh well...
In fact, static linking might be short-sighted solution. I still need to find out why I can't implement the proper dynamic linking. Maybe there are just a few more places where the handle control is screwed, with dosobj subsystem being the first suspect.
The problem seems to be that I am using absolute pointers in athunks, so they do not properly relocate after dos exec. Still don't see any obvious solution besides the static linking. :(
Seems somewhat working...
dlmopen() is not portable. The code is arranged to track all the resources with handles, so I suppose its quite ready to work w/o dlmopen(). Its likely that only crt1_startup should be tweaked.