* gcc-newlib includes unwanted stuff
@ 2000-05-29 19:23 Gerhard Heinzel
2000-05-31 11:50 ` Aaron J. Grier
0 siblings, 1 reply; 2+ messages in thread
From: Gerhard Heinzel @ 2000-05-29 19:23 UTC (permalink / raw)
To: crossgcc
I am using "h8300-hms-gcc" version 2.95.2 with
"newlib-1.8.1" to compile C programs for an embedded
application on the Hitachi 3048F processor (which includes on
the chip 4k RAM, 128k ROM and lots of useful functions).
newlib was configured as
./configure --host=i686-pc-linux-gnu --target=h8300-hms --norecursion
I found that the library wastes a lot of memory for things
that I don't need:
- the standard initialization routine calls "_exit" which in
turn calls "malloc". This is something I do neither need
nor want, since it uses up a lot of my precious 4k RAM.
Luckily I could easily get rid of that one by not calling
"_exit" any more in "crt0.o". "exit" in my embedded
application is achieved via the power switch.
However, another one I cannot get rid of so easily and that's
why I ask for help:
- I need some floating point routines (from fp-bit.o), and
also one square root of a number which I know to be
positive. The linker includes "errno.o" because of the
"sqrt", and "errno.o" in turn includes "impure.o" which
comes with a huge "static struct _reent
__ATTRIBUTE_IMPURE_DATA__ impure_data" This structure takes
more than 600 bytes, which is more than 16% of my total
RAM.
How can I avoid linking this "impure.o" ?
Thanks for any hints,
Gerhard
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gcc-newlib includes unwanted stuff
2000-05-29 19:23 gcc-newlib includes unwanted stuff Gerhard Heinzel
@ 2000-05-31 11:50 ` Aaron J. Grier
0 siblings, 0 replies; 2+ messages in thread
From: Aaron J. Grier @ 2000-05-31 11:50 UTC (permalink / raw)
To: crossgcc
On Tue, May 30, 2000 at 11:25:16AM +0900, Gerhard Heinzel wrote:
> - I need some floating point routines (from fp-bit.o), and
> also one square root of a number which I know to be
> positive. The linker includes "errno.o" because of the
> "sqrt", and "errno.o" in turn includes "impure.o" which
> comes with a huge "static struct _reent
> __ATTRIBUTE_IMPURE_DATA__ impure_data" This structure takes
> more than 600 bytes, which is more than 16% of my total
> RAM.
>
> How can I avoid linking this "impure.o" ?
> Thanks for any hints,
couldn't you simply remove errno references from fp-bit?
--
Aaron J. Grier | Frye Electronics, Tigard, OR | aaron@frye.com
"The simplistic anthropomorphism which asserts that source code has a
life separate from its creator or maintainer is the product of one
too many viewings of Tron." -- paraphrasing of anonymous post on /.
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-05-31 11:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-29 19:23 gcc-newlib includes unwanted stuff Gerhard Heinzel
2000-05-31 11:50 ` Aaron J. Grier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).