May be this is incorrect?

Leon Pollak leonp at plris.com
Sun Apr 16 06:01:43 UTC 2000


Joel Sherrill wrote:

> 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. :)

    Joell, this was exactly what I did and this way I came to this point.
More than that, when I did this change, everything was O'K.
    Now, please, how it can be that you see assert and don't see printf? I
have it in the line 57 of my mewlib-1.8.0/newlib/libc/stdlib/assert.c

Thnks.
leonp at plris.com




More information about the users mailing list