uClibc++ version 0.1.12 released

Dave Dodge dododge at dododge.net
Fri Dec 16 16:53:36 UTC 2005


On Mon, Dec 12, 2005 at 04:29:32AM -0600, Rob Landley wrote:
> Lots of people out there want to use C++ anyway, and it is possible
> to use C++ to produce reasonably sized binaries, with a little
> effort.  (To start with, don't use templates ever for anything, and
> disable exception handling.)

As a data point:

  #include <map>
  #include <string>
  using namespace std;
  int main() { map<string,string> x; x["y"] = "z"; return 0; }

It looks pretty tame, and doesn't really do anything at all.  But if I
compile it with -g, I get 292K of assembly code, 85K of object code,
and a 75K executable.  Even stripped it's still 7K of object code and
an 11K executable to do nothing at all.

That's actually an improvement; when I first encountered this a couple
years ago it was because someone was having trouble just getting it to
compile at all.  On their system it was more like 388K of assembly and
131K of object code, with around 100 unnamed functions and many
identifiers in the assembly phase with names over 1024 characters long
(which were choking the system's assembler).

                                                  -Dave Dodge



More information about the uClibc mailing list