This is the mail archive of the gcc@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: selecting the right target...


On Wed, 2001-12-19 at 13:00, Phil Blundell wrote:
> >I'm not sure of anything except that I want our binaries to be as small
> >as possible.
> 
> Hmm, I see.  I'd have thought that the cost of this stuff would be on the order
> of tens of bytes, but maybe that was over-optimistic.  I'll investigate the
> binaries on my arm-linux system and see how much code is involved there.

Looking closer it looks like this for my hello world which directly
calls write():
 - old aplio toolchain with gcc 2.96 (½¬#¼¦¬!)
	560 byte flat binary.
 - arm-elf gcc-2.95
	2.5k flat binary
	the 2k is init_stdio and __gccmain and their respective
 	dependencies which were not pulled in with the old toolchain.
 - arm-uclinux gcc-3.0.2, global_[cd]tors handling in crtbegin/crtend
	1k flat binary. Ok, this is reasonable. But it generates .init 	and
.fini sections, I'm not sure how to handle these. trash them
	or append them to .text?
	Also: is it safe to swap crtbegin with crt0? elf2flt assumes the
	start symbol to be right at the beginning of .text. [Ok, here 
	comes the point I'll ask David McCullough who hacks around with 
	the elf2flt tool.]
 - arm-uclinux gcc-3.0.2 with #undef (INIT|FINI)_SECTION_ASM_OP
	14k flat binary. __do_global_[cd]tors are not big, true, but
	cause quite a few functions from libgcc to be included in the 	binary.
Not sure how significant this is as bigger programs 
	would probably use these anyway.

greets from Zürich
-- vbi


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