static linking error

Dan Kegel dank@kegel.com
Tue Jul 8 20:57:00 GMT 2003


Charles Lockhart wrote:
> Running "$(CROSS_COMPILE)gcc test.c -s" I get a small binary file that's 
> identical to the one generated if I don't statically link the executable.

Ah, silly me, I meant -static.

> I'm trying to create a stand alone executable that I can download to the 
> target system via a jtag interface and have it run.  But maybe I'm 
> taking the wrong approach.

Hmm.  Most people in your shoes use newlib, not glibc.  Newlib, I hear,
includes things like itoa without having any nasty references to
an underlying operating system.

'Course, you'll need to add newlib support to the crosstool script to do
that.  It's probably not too hard; somebody else was already interested
in it, maybe they've started.
- Dan

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list