Yagarto: interwork library doesn't support interworking?

OP #1173925
Rate this post
• ▲ useful
▼ not useful
I'm using Yagarto....20080408 package.  I'm compiling with:

"c:/yagarto/bin/arm-elf-gcc"  -gdwarf-2 -MD -Wall -O -mapcs-frame
-I./Source/ -I../library/inc/ -I../library/src/ -I../ethernet_lib/
-I../uip/  -mthumb-interwork -c ../library/src/usb_int.c -o usb_int.o
"
and linking with:
"c:/yagarto/bin/arm-elf-ld" -T./settings/head_yagarto.ld
-T./settings/Flash.ld  -T./settings/input_make.ld
-T./settings/sections_make.ld  --cref -static -L
c:/yagarto/lib/gcc/arm-elf/4.2.2/interwork -lc -lgcc -Map=Demo.map
-start-group  -o Demo.elf

Where head_yagarto.ld contains:
SEARCH_DIR("c:/yagarto/lib/gcc/arm-elf/4.2.2/thumb/interwork");

but, link fails with:
c:\yagarto\bin\arm-elf-ld.exe: Warning:
c:\yagarto\bin\../arm-elf/lib\libc.a(lib_a-memset.o) does not support
interworking, whereas Demo.elf does.

So, why do the Yagarto interwork libraries not support interworking???
OP #1173927
Rate this post
• ▲ useful
▼ not useful
Simon Ellwood wrote:
> Do not use arm-elf-ld to link with.
>
> Use arm-elf-gcc to link and then it will pic the correct libraries.
>
> I have had this problem myself.
>
> Some of the older makefiles call arm-elf-ld.
>
> Get back to us if this helps or you need more help!

Well, I've read this comment in other places, but since the only STR9
project that I've been able to make build/link successfully, is the
Hitex comStick demo project - and they call ld directly, I was trying to
using their make/ld files to build my project as well.

Accepting that you'd prefer that I not call ld directly, could you at
least explain to me why the interwork library doesn't support
interworking?
OP #1173928
Rate this post
• ▲ useful
▼ not useful
Well, nevermind all this... I started over again, regenerating my ld
file and the call to "gcc -Wl", and everything compiles just fine.
What's more, when I load the resulting .elf file into insight, it starts
at address 0, which it never did before!!  So I think everything is
fine, and I'm ready to start playing around with OpenOCD and insight.
#1173929
Rate this post
• ▲ useful
▼ not useful
To answer your question. If you call ld directly then you will have to
tell the linker where the libraries are.

If you link with gcc then the compiler will automatically find the right
libraries.

So if if the information I have is correct then the reason your
libraries you are linking too do not support inter-working is that they
are NOT the inter-working libraries.

This is just information I have got from this very forum. I did have a
big problem with linking when calling ld and switching to gcc did fix
it.

I am glad you have made some progress!

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.