disable newlib

Manuel Coutinho manuel.coutinho at edisoft.pt
Mon Aug 18 15:04:52 UTC 2008



Manuel Coutinho
Software Engineer - Space

 cid:image002.jpg at 01C7EEE1.32B7B120

EDISOFT, S.A. 
Rua Quinta dos Medronheiros - Lazarim 
Apartado 382 Monte de Caparica 
2826-801 Caparica Portugal


> -----Original Message-----
> From: Ralf Corsepius [mailto:ralf.corsepius at rtems.org]
> Sent: Monday, August 18, 2008 4:02 PM
> To: Manuel Coutinho
> Cc: 'Joel Sherrill'; 'xu ray'; rtems-users at rtems.com
> Subject: RE: disable newlib
> 
> On Mon, 2008-08-18 at 15:57 +0100, Manuel Coutinho wrote:
> > Hi
> >
> > We are trying to make possible a configuration (using the configure
> script)
> > where RTEMS does not have newlib (open, close, malloc, etc) and other
> things
> > so that a minimal footprint can be achieved.
> >
> > At this stage, we are just checking how much effort is required to
> perform
> > this. I would suggest to place #ifdef inside the RTEMS source code so
> that
> > the unnecessary calls are not made. However, there is more work needed
> here.
> >
> > I've tried to take out most of the calls to libc and other things that
> we
> > don't need from the RTEMS source code (e.g rtems_termios_init, etc) and
> the
> > footprint has been reduced from ~70 KiB to ~37KiB, but we need to go
> further
> > and remove all dead code. Since RTEMS itself makes calls to newlib or
> libc,
> > if the application does not make the extra calls it is not sufficient
> > because the code will still be present.
> What you are missing: GCC emits calls to newlib.
Yes, I forgot to mention this. There are some calls to open, close, etc.

> 
> > Now, we stumbled with the newlib source code that is very intertwined
> with
> > RTEMS (mainly to make malloc reentrant, from what I can tell). This will
> > need some detailed research to make sure everything works well.
> Good luck - To me your plan is nothing but silly.
> 





More information about the users mailing list