|
The google solution sounds easier, though, I agree. It would be quite a bit of work to implement the hack correctly.
|
|
If the functions we want are listed in the Import Table, then you will get the entry-not-found error when trying to load mongod.exe. If you want to link to something else and then patch the Import Table at runtime, that's what I was thinking of as a "hacky/clever" solution. It could be done if it was felt to be worthwhile.
|
|
We could try dynamically linking the function as a dummy call at startup only, and then use a static link for the actual use calls.
|
|
This can't really be fixed without taking a performance hit, and this build's reason for existing is for high performance. The usual way of solving problems like this is to link to the potentially missing routines on-the-fly by using GetProcAddress, but then every call to any SRW routine will go through an extra indirection. These are inlined throughout the code, so unless we do something hacky/clever we'd take a hit on code bloat and speed. The benefits of a hacky/clever solution would go to the users who are running the wrong build but the cost would go to the people running the right build. It's probably better to just make sure that the expected error message about the entry point is easy to Google for so users don't lose much time over it.
|
Generated at Thu Feb 08 03:12:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.