some questions about ld conection?

loody miloody@gmail.com
Thu Nov 19 15:47:00 GMT 2009


Dear all:
I am trying to build cross-toolchain and there is a question make me confuse.
my questions are:
1. How gcc know where ld is?
if I type mipsel-unknown-elf-gcc -g test.c, gcc will automatically
call linker to link the necessary libraries.
As far as I know, gcc and binutils are 2 independent packages, so
there must be some setting let gcc know where the ld is, right?
But I cannot see the connection in my configures of binutils and gcc as below:
binutils configure:
/root/toolchain/targets/src/binutils-2.17/configure
--build=i486-build_pc-linux-gnu --host=i486-build_pc-linux-gnu
--target=mipsel-unknown-elf
--prefix=/root/bare_metal/x-tools/mipsel-unknown-elf --disable-nls
--disable-multilib --disable-werror --with-float=soft
--with-sysroot=/root/bare_metal/x-tools/mipsel-unknown-elf/mipsel-unknown-elf//sys-root

my gcc configure:
/root/toolchain/targets/src/gcc-4.2.4/configure
--build=i486-build_pc-linux-gnu --host=i486-build_pc-linux-gnu
--target=mipsel-unknown-elf
--prefix=/root/bare_metal/x-tools/mipsel-unknown-elf
--with-local-prefix=/root/bare_metal/x-tools/mipsel-unknown-elf/mipsel-unknown-elf//sys-root
--disable-multilib
--with-sysroot=/root/bare_metal/x-tools/mipsel-unknown-elf/mipsel-unknown-elf//sys-root
--with-newlib --enable-threads=no --disable-shared --with-float=soft
--disable-__cxa_atexit --disable-nls --enable-symvers=gnu
--enable-languages=c --enable-target-optspace

2. what are the difference of elf32-littlemips and elf32-tradlittlemips?

3. under what circumstances we will need "Supported emulations" in ld?

appreciate your help,
miloody



More information about the Binutils mailing list