[gccsdk] Help with gas
gavin at wra1th.plus.com
Sun Dec 30 08:20:42 PST 2012
I am making a serious effort (again) to get to grips with gcc4_1_2r2.
I am trying to assemble a short piece of ARM code with
gcc -o sys.o sys.s
I keep getting an error:
....: In function 'crt1_data':
crt0.S:(.data+0x14): undefined reference to 'main'
collect2: ld returned 1 exit status
make: *** [sys.o] Error 1
I have no idea what any of this means. The code used to assemble without
fuss for objasm. I changed ; to @, EXPORT to .global, put colons
after the label declarations, changed the AREA directive to .text
and removed the END statement.
Can anybody with experience see what I have left undone or done wrong?
There are no data areas, no internal references, only relocatable code.
The only constants are immediate ones in instructions. There are no
PC-relative loads or stores. I suspect that I have not told gas something
that it wants to know, but it is not too clever at telling me what.
Gavin Wraith (gavin at wra1th.plus.com)
Home page: http://www.wra1th.plus.com/
More information about the gcc