Hi I using gcc on a .S file to assemble my program.
#include <string.h>
.text
.global defaultBSTNode
defaultBSTNode:
pushl %ebp
movl %esp, %ebp
addl $last_local, %esp
#//void * memset ( void * ptr, int value, size_t num );
pushl $bst_size
pushl $0
pushl retValuePtr(%ebp)
call memset
addl $12, %esp
movl %ebp, %esp
popl %ebp
ret
I keep getting errors when I link:
gcc -g -c addBSTNode.S
....
/usr/include/string.h:28: Error: no such instruction: `__begin_decls'
Like 50 errors all saying no such instruction.
Any ideas what's wrong?
thanks