bin/ld: unrecognised emulation mode: apfile

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I got the following error message while cross compiling my application for ecos.

arm-elf-gcc -Wl,-Map,-mapfile -L/root/httpd_test/ecos_kernel/install/lib -Ttarge
t.ld test_httpd.o -L../libhttpd-1.3/src -lhttp -o test
/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/
bin/ld: unrecognised emulation mode: apfile
                                     ^^^^^^
Where do I change the value for the emulation mode?

Supported emulations: armelf
collect2: ld returned 1 exit status
make: *** [test] Error 1


Thanks!

Re: bin/ld: unrecognised emulation mode: apfile
Quoted text here. Click to load it
ecos.
Quoted text here. Click to load it
-Ttarge
Quoted text here. Click to load it
/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/
Quoted text here. Click to load it

The linker switch -m selects the target emulation mode.

You have specified -mapfile, meaning select 'apfile'. Please
read again the ld command line specification for the map file.

Tauno Voipio
tauno voipio (at) iki fi



Re: bin/ld: unrecognised emulation mode: apfile
Thanks for the help earlier on. I make the file again and the linker
throw me the following errors:

arm-elf-gcc --print-map
-L/root/eCos_Library_Builds/Net_lib/net_lib_install/lib
-Ttarget.ld test_httpd.o -L../libhttpd-1.3/src -lhttp -o test
/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/lib/crt0.o:
In function `start':
/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/lib/crt0.o(.text+0x0):
multiple definition of `start'
/root/eCos_Library_Builds/Net_lib/net_lib_install/lib/vectors.o(.text+0x3c):
first defined here
/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld:
cannot find -lc
collect2: ld returned 1 exit status
make: *** [test] Error 1

The vectors.o is included in my eCos net lib. Does that mean that I
should remove the lib to solve the prob? What does crt0.o do?

As for the cannot find -lc, is it looking for libc and its missing?

Btw are there any good documentations or sites on using arm-elf tools?

Thanks!



Quoted text here. Click to load it
ecos.
Quoted text here. Click to load it
-Ttarge
Quoted text here. Click to load it
/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/
Quoted text here. Click to load it

Re: bin/ld: unrecognised emulation mode: apfile
Quoted text here. Click to load it
/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/lib/crt0.o:
Quoted text here. Click to load it
/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/lib/crt0.o(.text+0x0):
Quoted text here. Click to load it
/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld:
Quoted text here. Click to load it

The file crt0.o is the C runtime initialization module. It seems that
you have two conflicting start-up modules. This is probably an
eCos problem - see the documentation on the proper way to link
a run module for it. Sorry, I don't know enough of eCos to be
able to help here.

Quoted text here. Click to load it

Yes. It should find a C library for arm-elf and it seems not be
there. This is a toolkit configuration problem: the compiler is
not configured to find the library, if it is there. Please note
that the library must be suitable for the target processor, the
host system (e.g. Linux) libc won't do.

I'm using newlib with gcc 3.2.1 for stand-alone ARM code.

Quoted text here. Click to load it

You could start with: <http://www.objsw.com/CrossGCC/FAQ.html .


Good luck!

Tauno Voipio
tauno voipio (at) iki fi


Site Timeline