libstdc++

Andrew Haley aph@redhat.com
Fri Aug 24 09:33:00 GMT 2012


On 08/24/2012 08:46 AM, naga raj wrote:
> Hi,
> 
>    I have ported Gcc-4.6.2 to an embedded target. My C++ compiler is
> generating huge code size.
> 
>   #include <iostream>
>  using namespace std;
>  int main()
>  {
>    return 0;
>  }
> 
>    If we execute the above program then all the function in the
> iostream library are included in the elf as a result size of elf is
> increased....
> 
> 
> Please help me in solving this issue..

You're going to have to use custom I/O.  To start, link with
-Wl,-Map,mapfile to see what dependencies are being pulled in.

Andrew.




More information about the Gcc-help mailing list