Why can't you combine a DLL with an EXE, as if it were statically linked?

Why is it not possible * to "reassign" the native shared library (DLL) to an executable file, as if they were statically linked? Is the DLL missing the required information?

* Note: or is it really possible? If so, let me know, but through a search I have come to the conclusion that this is impossible.

+3
source share
1 answer

It's impossible.

When the EXE loads the DLL (via LoadLibrary), most of the work done by the DLL loader to fix the addresses. You cannot simply merge the DLL as it is with exe because its addresses are incorrect if they are not dynamically loaded.

, LIB : , , .

, DLL EXE OBJ .

+1

All Articles