Page 1 of 1

Linking object files

PostPosted: Sat Jun 27, 2015 1:18 am
by snim2
I am assembling and linking some Epiphany assembler files like this:

Code: Select all
epiphany-elf-as add.S -o add.o
epiphany-elf-ld -N -T $EPIPHANY_HOME/bsps/parallella_E16G3_1GB/internal.ldf add.o -static -o add.elf


which results in this error message:

Code: Select all
epiphany-elf-ld: warning: cannot find entry symbol _start; defaulting to 0000000000000058


Do I really need a _start symbol in my assembler, or can I just use main? Or have I missed a library that the linker needs to know about?

Thanks,

Sarah

Re: Linking object files

PostPosted: Sat Jun 27, 2015 8:03 am
by piotr5
as far as I know c-programs don't really start with the main procedure. before that libs are loaded and such. so also in assembler "main" has no meaning.

Re: Linking object files

PostPosted: Sat Jun 27, 2015 12:04 pm
by snim2
That's extremely helpful, many thanks!

Sarah