2017-06-03 12:11 GMT+04:00 Mateusz Mikuła <mati...@gmail.com>:

> Here is ios_base::Init https://github.com/gcc-mirror/
> gcc/blob/master/libstdc%2B%2B-v3/include/std/iostream#L74
> If you really want to understand what compiler put into your executable
> you have to disassemble it.
> Bear in mind that even if you knew whole source code of libstdc++ you
> would get different code in binary due to compiler optimizations and
> disabling them for final product is stupid unless they break something.
>

Now I'm curious where the __ioinit is...

Found this by accident, it seems related:
https://gcc.gnu.org/onlinedocs/gcc-6.3.0/libstdc++/manual/manual/io.html

As I understood from that link, ideally you have only one #include
<iostream> per object file, overwise you'll end up with extra copies of
__ioinit in each. Don't quite understand that either, can't linker just
throw those away?


2017-06-03 12:37 GMT+04:00 Mateusz Mikuła <mati...@gmail.com>:

> Pasted wrong link, here is fixed https://github.com/gcc-mirror/
> gcc/blob/master/libstdc%2B%2B-v3/include/bits/ios_base.h#L601


Don't see any real code still, there should be something like stdout =
GetStdHandle(STD_OUTPUT_HANDLE); somewhere.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to