[En-Nut-Discussion] (no subject)

Henrik Maier hmnews at proconx.com
Wed Oct 26 04:50:17 CEST 2011


On 26/10/2011 6:18 AM, Bob Wirka wrote:
> Harald,
>
> Thank you for your reply, and thank you for NutOS.
>
> What is confusing me is that _sbrk is indeed present within libnutcrt, and I can force libc before libnutcrt for the linker. And yet the linker claims not to see it.
>
> Haven't tested the code yet to see if anything is broken by having sbrk.c in my project instead of (and, maybe, in addition to) the version in libnutcrt.

This could be a cyclic reference issue between two libraries.

I always use the grouping option for the linker and enclose all 
libraries in it. That way the linker takes care of resolving cyclic 
references and the nightmare of re-ordering libraries and doubling them 
up is eliminated.

Example:

LIBS =  $(LIBDIR)/nutinit.o -Wl,--start-group -lc -lnutpro -lnutos 
-lnutarch -lnutdev -lnutnet -lnutfs -lnutcrt -Wl,--end-group

Henrik



More information about the En-Nut-Discussion mailing list