Linking object files

Linking object files

Postby snim2 » Sat Jun 27, 2015 1:18 am

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
snim2
 
Posts: 53
Joined: Mon Feb 03, 2014 5:02 pm

Re: Linking object files

Postby piotr5 » Sat Jun 27, 2015 8:03 am

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.
piotr5
 
Posts: 230
Joined: Sun Dec 23, 2012 2:48 pm

Re: Linking object files

Postby snim2 » Sat Jun 27, 2015 12:04 pm

That's extremely helpful, many thanks!

Sarah
snim2
 
Posts: 53
Joined: Mon Feb 03, 2014 5:02 pm


Return to Assembly

Who is online

Users browsing this forum: No registered users and 1 guest