Most likely, it is not the order the files are COMPILED, but actually the order they are LINKED (which is defined by the order you have your sources in, I expect) - g++ "collects" the global initialization of variables in the linking stage, and they are then processed in the order they were found. However, this just happens to be the "observed behaviour". Initialization between different compile units in C++ is undefined. You must not rely on it being in one way or another, there is absolutely nothing preventing g++ from changing the order that it puts the global initialization so that it is done in reverse order instead of the current order (because that makes the link process faster, or some other clever reason - or just "felt like it") - and they wouldn't even have to tell you that they have done so.
So, basically, if you have global objects, then you must either put them into a single source file ("globalobjects.cpp" or some such) to make them initialize in a defined order, or don't rely on one being initialized before another. Or rely on the vague definition that "currently the linker does things in the right order as long as I put my files in the right order".