This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Smpeg MMX asm compilation (problem)
Matthew Bentley wrote:
On Sun, Aug 20, 2006 at 12:30:55PM +1200, Matthew Bentley wrote:
I'm building under msys, mingw.
.text
.align 4
.globl cpu_flags
.type cpu_flags,@function
This is ELF assembly. It won't work on mingw32, which uses COFF/PE.
> Thanks Daniel- I've been trying to figure that out for ages.
> Any way at all to compile ELF asm in windows?
> Or an easy way to convert the code to COFF?
instead of:
.type cpu_flags,@function
you write:
.def cpu_flags; .scl 2; .type 32; .endef
You can leave ".size" out.
You would be better off writting defines/macros for this.
Simplified example, from code found in some places in gnu sources:
#ifdef __ELF__
# define TYPE(x) .type x,@function
# define SIZE(x) .size x, . - x
#else
# define TYPE(x) .def x; .scl 2; .type 32; .endef
# define SIZE(x)
#endif
Cheers,
Pedro Alves