Linking standard libc.a and libg.a in arm-none-eabi

OP (Company: none) #2299722
Rate this post
useful
not useful
Hi All,

My code works fine without any std lib calls. If I make any std lib 
call,
the linking fails. for e.g. undefined reference to 'malloc'.

I have used
GROUP(-lc -lg) in .ld file.

I have also added the lib file in arm-none-eabi-ld...

arm-none-eabi-ld -v 
-T../CodeSourcery/Sourcery_G++_Lite/arm-none-eabi/lib/bco_setup2.ld -L 
../CodeSourcery/Sourcery_G++_Lite/arm-none-eabi/lib -lc -lg -o image.elf 
demo.o  asm-vector.o asm-isr.o start.o

Do you see anything missing?

Regards

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now