Linker not able to locate std libraries

Michael Anburaj embeddedeng@hotmail.com
Fri Oct 25 12:08:00 GMT 2002


Hi Sung-Kun,

Its bit confusing now...

What is the standard method of invoking the linker (ld or gcc)? Please point 
me to a document that talks about this in detail.

Clipping from my make files (its originally YAMONÂ’s -MIPS.com):

TOOLCHAIN = cygnus

ifeq ($(TOOLCHAIN),cygnus)
CC        = mipsisa32-elf-gcc
LD        = mipsisa32-elf-ld
OBJCOPY   = mipsisa32-elf-objcopy
OBJDUMP   = mipsisa32-elf-objdump
endif

ifeq ($(TOOLCHAIN),sde)
CC        = sde-gcc
LD        = sde-ld
OBJCOPY   = sde-objcopy
OBJDUMP   = sde-objdump
endif

Thanks for your response...
-Mike.



>From: "Cho, Sung-Kun" <sung-kun_cho@mentorg.com>
>To: 'Michael Anburaj' <embeddedeng@hotmail.com>, 
>crossgcc@sources.redhat.com
>Subject: RE: Linker not able to locate std libraries
>Date: Fri, 25 Oct 2002 11:47:57 -0700
>
>Why don't you try
>mipsisa32-elf-gcc -g -Tatlas32.ld -o hello.exe 
>-Wl,-oformat,elf32-littlemips
>
>hello.o
>instead of
>mipsisa32-elf-ld -g -Tatlas32.ld -o hello.exe -oformat elf32-littlemips
>hello.o
>?
>You may need to modify Makefile a little for this.
>
>-----Original Message-----
>From: Michael Anburaj [mailto:embeddedeng@hotmail.com]
>Sent: Friday, October 25, 2002 11:26 AM
>To: crossgcc@sources.redhat.com
>Subject: Linker not able to locate std libraries
>
>
>Hi,
>
>As per the MIPS3264.pdf Secssion1., I tried building the hello.c program
>using the following command
>
>mipsisa32-elf-gcc -g hello.c -Tatlas32.ld -o hello.exe
>
>It worked very well & built the hello.exe
>
>Then I thought of trying the compile & link separately using the following
>commands...
>
>mipsisa32-elf-gcc -c hello.c -o hello.o
>mipsisa32-elf-ld -g -Tatlas32.ld -o hello.exe -oformat elf32-littlemips
>hello.o
>
>Now the linker is reporting with "cannot open linker script file 
>atlas32.ld:
>
>No such file or directory"
>
>Why is this happening & that to it happens only when I split the build
>process into compile & link with 2 separate commands?
>
>To get around this, I copied the atlas.ld to the same directory where I am
>building, I get Similar errors for libc.a & libgcc.a files.
>
>In my actual application I have to do it in this faction.. Compile all the
>.c & .s file into .o & then finally link them all into an elf (.exe). While
>linking I run into problems (The linker is not able to locate the standard
>linker scripts & standard library files (libc.a, libgcc.a & like).
>
>Please do help me...
>
>Thanks,
>-Mike.
>
>
>_________________________________________________________________
>Internet access plans that fit your lifestyle -- join MSN.
>http://resourcecenter.msn.com/access/plans/default.asp
>
>
>------
>Want more information?  See the CrossGCC FAQ, 
>http://www.objsw.com/CrossGCC/
>Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


_________________________________________________________________
Choose an Internet access plan right for you -- try MSN! 
http://resourcecenter.msn.com/access/plans/default.asp


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list