|
From: Michael D. <mic...@fr...> - 2007-07-18 09:49:04
|
haibin zhang a écrit : > Hi All : > I test cpu id using as in > binutils-2.17.50-20070129-1.tar.gz, but it can't > compile pass, I have tested this in linux, it's ok. > > I have two file :cpuidfunc.s stringtest.c > I use compile command : > gcc -o test.exe cpuidfunc.s stringtest.c > > It print error : > $ gcc -o test.exe cpuidfunc.s stringtest.c > cpuidfunc.s: Assembler messages: > cpuidfunc.s:5: Warning: .type pseudo-op used outside > of .def/.endef ignored. > cpuidfunc.s:5: Error: junk at end of line, first > unrecognized character is `c' [snip] > ------------------------------------------------------------------------ > > # cpuidfunc.s - An example of returning a string value > .section .bss > .comm output, 13 > .section .text > .type cpuidfunc, @function > .globl cpuidfunc > cpuidfunc: [snip] From Gnu Assembler: http://tigcc.ticalc.org/doc/gnuasm.html#SEC133 .type Syntax: .type int This directive, permitted only within .def/.endef pairs, records the integer int as the type attribute of a symbol table entry. The line should be. .globl cpuidfunc .def .type cpuidfunc, @function; .endef Michael |