bin/ld: unrecognised emulation mode: apfile

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!

Reply to
mantaray
Loading thread data ...

ecos.

-Ttarge

/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/

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

Reply to
Tauno Voipio

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!

ecos.

-Ttarge

/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/

Reply to
mantaray

/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/lib/crt0.o:

/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/lib/crt0.o(.text+0x0):

/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld:

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.

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.

You could start with: .

Good luck!

Tauno Voipio tauno voipio (at) iki fi

Reply to
Tauno Voipio

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.