This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Giant executables.. what am I doing wrong?


If you run 'nm' on your pre-stripped executable you will see all the
compiled in functions from the C library and any other libraries. When you
do a static compile it doesn't just include only the needed function(s), but
the entire C library .a file. That's why I recommended going with a smaller
or more base-functionality C library such as newlib.

--josh

----- Original Message -----
From: "Michiel Buddingh'" <ajuin+mail@stack.nl>
To: <gcc-help@gcc.gnu.org>
Sent: Monday, October 14, 2002 9:49 PM
Subject: Re: Giant executables.. what am I doing wrong?


> On Mon, Oct 14, 2002 at 08:34:55PM -0400, Joshua Nye wrote:
> > Sounds like you might need a smaller C library then. Check out
> > newlib or some other library and see if that fits your problem.
> > I'm not that familiar with shrinking the C library. =)
>
> Although newlib does look interesting, I doubt the problem lies
> with the C library. Unless I'm mistaken, system calls should have
> little to do with the C library, as the program calls the kernel
> directly.
> This supports my suspicion that gcc is linking in a lot of stuff
> I could do without.
> --
> -- Michiel
>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]