This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: crt1.o not found in mipsel-linux


Hello All, 
Thanks for all the help... I got glibc installed, but I couldnot get my problem solved completely. 
When, I compile and link from the command line, I could create elf and rec output format files to load onto my AMD Au1550 MIPS board. but, when I try to load the image, it says "no match found in TLB for the mapped address". I am giving the commands I am using 

mipsel-linux-gcc -c main.c -I/usr/include

mipsel-linux-gcc -nostartfiles /home/Uday/GLIBC/usr/lib/crti.o /home/Uday/GLIBC/usr/lib/crt1.o -L/home/Uday/GLIBC/usr/lib -L/home/Uday/GLIBC/lib -o main.elf main.o 

mipsel-linux-objcopy -S -O srec main.elf main.rec

but main.rec doesnot load onto the board when using YAMON

Is there any problem with the linking. I know this error occurs when the start adress of .text section is not correct. but, how do I specify the start adress using gcc (instead of LD).

When I use a makefile instead of linking from the commnad line, the linker crashes with segmentation fault. This is what I get

 mipsel-linux-gcc -nostartfiles /home/Uday/GLIBC/usr/lib/crti.o /home/Uday/GLIBC/usr/lib/crt1.o -L/home/Uday/GLIBC/usr/lib -L/home/Uday/GLIBC/lib -o main.elf main.o 
[root@localhost hello]# make clean all                                   
rm -f *.o hello.elf hello.srec hello.bin
mipsel-linux-gcc -O -G 0 -Wall -I/usr/include  -c main.c -o main.o
main.c:17: warning: return type defaults to `int'
mipsel-linux-gcc -nostartfiles /home/Uday/GLIBC/usr/lib/crt1.o /home/Uday/GLIBC/usr/lib/crti.o -o hello.elf -nodefaultlibs -L /home/Uday/GLIBC/usr/lib -L /home/Uday/GLIBC/lib 
collect2: ld terminated with signal 11 [Segmentation fault]
make: *** [hello.elf] Error 1


I am including the make file for your reference...

LOADADDR = 0xa0040000
RAMSIZE = 0x00100000		# 1MB

CROSS_COMPILE = mipsel-linux-

######## END OF CONFIGURATION #########

.c.o:
	$(CC) $(CFLAGS) -c $< -o $*.o

CC =       $(CROSS_COMPILE)gcc
LD =       $(CROSS_COMPILE)ld
OBJCOPY =  $(CROSS_COMPILE)objcopy
OBJDUMP =  $(CROSS_COMPILE)objdump

CFLAGS = -O -G 0 -Wall -I/usr/include 

# Drop some uninteresting sections in the kernel.
# This is only relevant for ELF kernels but doesn't hurt a.out
#drop-sections   = .reginfo .mdebug
#strip-flags     = $(addprefix --remove-section=,$(drop-sections))


all : elf srec bin

srec : hello.srec
elf : hello.elf
bin : hello.bin

hello.elf : main.o
	$(LD) -nostartfiles /home/Uday/GLIBC/usr/lib/crt1.o /home/Uday/GLIBC/usr/lib/crti.o -o hello.elf -nodefaultlibs -L /home/Uday/GLIBC/usr/lib -L /home/Uday/GLIBC/lib 
	
hello.srec : hello.elf
	$(OBJCOPY) -S -O srec $(strip-flags) hello.elf hello.srec

hello.bin : hello.elf
	$(OBJCOPY) -S -O binary $(strip-flags) hello.elf hello.bin

clean:
	rm -f *.o hello.elf hello.srec hello.bin

If I could get this makefile running, I know I could specify the start address using -T option from the gcc linker LD......

May be , I am missing something or there is something wrong in my makefile bcoz of my inexperience in writing makefiles.......Any help would be appreciated........Thank you - Pati
--
Sent from the Sourceware - crossgcc list forum at Nabble.com:
http://www.nabble.com/crt1.o-not-found-in-mipsel-linux-t705223.html#a1911252


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]