This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: new memory debug feature


> > > Now the problem. I added the missing weak attribute. However, this
> > > causes problems for me. When the option is enabled and a failure
> > > happens, it crashes. All the tests in memalloc package fail
> > > horribly. If i remove the weak attribute they work. 
> > 
> > Can't we just leave out the weak attribute?
> 
> Have you tried having your own implementation of
> cyg_memalloc_alloc_fail(). You should get a linker error since there
> are then two implementations of the same function and the linker does
> not know which to use. The solution to this is to make the one in the
> eCos library weak. The linker will then only use the weak symbol when
> there is no strong symbol.

It works fine without linker warnings/errors. I believe this is as
expected since it is in a .obj file all by itself.


-- 
Øyvind Harboe
http://www.zylin.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]