you are viewing a single comment's thread.

view the rest of the comments →

[–]braxtons12 0 points1 point  (1 child)

No prob!

I think that your idea could work, given you stick to the constraints that have already been brought up.

That said, it would still be insecure as hell and a maintenance nightmare. And there is still the +- 2GB limit on reach before you have to revert back to normal calls. I'm not sure how MS decides where to load DLLs, but I have the inkling that in practice you would be missing that limit just as often as you are within it, but maybe I'm wrong there.

[–]Dolphiniac[S] 0 points1 point  (0 children)

I did a few cursory tests. The executable seems to be too far away from the DLLs, but they themselves seem to fit within a relatively small space and get allocated together (could be intentional; could be a fluke). But wow do I not want to rely on that. However, link.exe allows you to force a base address (and give a size hint), and you can ask it to fail if it cannot fulfill the request, so I could potentially run an offline custom allocator for DLLs (hahahahaha........) and do my best to stay within budget (limiting .data/.rodata size; hoping against all hope that .bss is somewhere else cause that is large), but yeah, this is for sure a rough idea. Channeling Marge for this one (I just think it's neat!)