Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: arm-elf-ld trouble

2006-05-27 by rtstofer

If ld can't find your functions, maybe you aren't including the object
file on the ld command line.

I have crt.o (the object file from crt.s) as a searate object in my
linker line:

LDSCRIPT  = lpc2106-FLASH.ld
LDFLAGS   =  -Map ${TARGET}.map -T${LDSCRIPT}
LOCATION  = /usr/local/arm
LD        = ${LOCATION}/bin/arm-elf-ld
OBJS      = main.o ata.o conio.o controller.o dir.o fat.o files.o \
            i2c.o interrupt.o ioports.o setup.o spi.o timer.o 

${TARGET}.elf : ${LDSCRIPT} crt.o ${OBJS}
	        ${LD} ${LDFLAGS} -o ${TARGET}.elf crt.o ${OBJS} ${LIBRARIES}

All of the OBJS are from C files, crt.o is the only object file
created from assembly language.

There is no problem with ld, almost everybody links an assembly
language startup file.

Richard

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.