Author Topic: 2018/03/16 - Blockland r1988  (Read 23208 times)



Holy stuff, an update.

What year is it again?

i wonder how many pages of stuffposts This dev topic will get
My money is on 8 pages

will we be getting support for BOFA
hey tito whats bofa?



why t'f my loading bar so damn big



now people will actually know im from 2013 and im not just some lucky cunt

...

If C++11 features are what you're worried about, most of them should still work even if you manually link against an older runtime. Those features are specific to the language and how the compiler toolset implements them, the extent of how much it relies on the actual runtime varies. Templated classes should be defined purely in headers, stuff like lambdas will be done with the compiler, and the rest boils down to fundamentals that need the runtimes to work properly, which implies the runtimes don't have to change a whole lot since they're the basic elements. So the idea is to resolve names to msvcp71.dll and msvcr71.dll instead of <insert runtime here>.dll. It should be as easy as swapping out the stub libraries with older ones in the visual studio installation, and maybe defining a few symbols here and there. Don't quote me on that.

Most DLLs I've seen are simple patches and hooks that don't really even need the standard library anyways. The exceptions are binder DLLs where they provide an interface to an existing library which can use some standard functions, but even then C-styled ones might only use a handful of functions like malloc, free, memcpy, etc. So what I like to do is get rid of the standard library altogether and rewrite what I need from scratch. That way all dependencies are gone, and whatever I need to use can be queried explicitly from the PEB, which makes for a DLL with zero imports and very little overhead both space and speed wise. It's definitely overkill, and redirecting what runtime it links to is better, but if we're only using 1% of the standard library anyways then why not go the extra mile to make it completely detached. It's not hard to write your own list, map, etc class either. Plus it's COOL!

In the end it's tempting to just static link everything together so it "just works," I don't know why Microsoft made it so the 2005 toolset can't be used but it makes for a headache. I might have to find time to test everything I've said and lay it out in a thread to standardize everything, we need a new loader anyways.