May be this is incorrect?

Joel Sherrill joel.sherrill at OARcorp.com
Thu Apr 13 19:27:48 UTC 2000


Leon Pollak wrote:
> 
> Hello, all.
>     I am dealing with rather tiny and specific project with
> RTEMS 4.5.0-beta1c and have the following problem.
>     File .../lib/libc/malloc.c in the line 319 calls assert(0) to abort
> application in the case of free() error. This causes all the stuff of
> printf and etc. to be included into the link process which in my case is
> undesired. The similar case occurs in the line 128, but  there the
> rtems_fatal_error_occurred() is used, which seems to be more correct.
> Isn't it?

This seems to be one of the nitpicky things that I was hoping to get
reports of. :)  Things like this are the surprising dependencies that
cause unneeded routines to get pulled into your executable.

I checked this with the minimum.exe sample application but I don't see
printf included.  I see malloc and RTEMS_Malloc_Initialize so I know
we are looking at the RTEMS malloc code.  I see __assert so it is in
the executable.  But printf is not.  Are you sure that is the only 
place it is referenced?

I built for i386-rtems .. pc486 BSP .. optimized.

You should do an objdump on your executable and search for 
printf.   It has to be called from somewhere. :)

> leonp at plris.com

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list