[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pc386 BSP and PowerPC questions.



Charles accidentally has some messages to me personally and some to the
list.  I cc'ed the list on this one to get the comments back out.

On Tue, 23 Feb 1999, Charles Gauthier wrote:

> I had to go back to my notes for this one. I switched back to newlib 1.8.0 when rtems 4.0.0 was released. It
> seemed like the easy path to follow.
> 
> With newlib 1.8.1 and rtems 3.6.0, I had some difficulty linking
> applications until I figured out a number of things and fixed newlib. On
> 1998/10/26, I had an undefined reference to _sbrk_r() comming from
> _malloc_trim_r()  and malloc_extend_top(), the former being called from
> _free_r(). _sbrk_r() is #ifdef'ed away when MALLOC_PROVIDED is defined.
> Investigation showed that I was pulling in the definition of _free_r()
> from mallocr.c. Quite possibly, the order in which you present libraries
> is different the order I was using, so you did not see the problem, or
> something has changed in RTEMS to mask the problem. 

The whole linking structure changed between 3.6.0 and 4.0.  It is quite
possible that an order problem has disappeared for the most part.   I know
that the general issue of accidentally getting something from libc was an
issue that periodically popped its head up in the snapshots.

Regardless, mallocr.c in newlib should have the same ifdef on it.

--joel

> 
> Charles
> 
> joel at OARcorp.com wrote:
> 
> > On Tue, 23 Feb 1999, Charles Gauthier wrote:
> >
> > >
> > >
> > > joel at oarcorp.com wrote:
> > >
> > > > On Tue, 23 Feb 1999 robini at icecube-consulting.com wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I have a question about using the pc386 BSP and RTEMS on a number of PC targets.
> > > > >
> > > > > Build Environment
> > > > > -----------------
> > > > >
> > > > > RedHat Linux 5.2
> > > > > RTEMS-4.0.0
> > > > > egcs-1.1.1
> > > > > binutils-2.9.1.0.15
> > > > > newlib-1.8.1
> > > > >
> > > > > patches *-rtems-diff-19981027
> > > > >
> > > > > I applied the patches from RTEMS-4.0.0 release by hand, as they were for egcs-1.1b, binutils-2.9.1 and
> > > > > newlib-1.8.0.  Most of them appeared to still be relevant.
> > > >
> > > > Most are still relevant for versions newer than the above.
> > > >
> > >
> > > I used newlib 1.8.1 with RTEMS 3.6.0. Newlib 1.8.1 has a new memory
> > > allocator written by Doug Lea. I remember that I had bracket the
> > > newlib-1.8.1/newlib/libc/stdlib/mallocr.c file with #ifndef
> > > MALLOC_PROVIDED/#endif in order to use the malloc provided with RTEMS.
> >
> > Hmmm..  I have not run into this but you are right, mallocr.c does not
> > have this ifdef in it.  Weird.
> >
> > What was the behavior you are seeing?  I have run 1000's of tests and not
> > tripped on this.
> >
> > I will add it so it is covered in the next newlib patch I generate.
> >
> > --joel
>