Lucas Teske
Lucas Teske

Reputation: 652

Mingw32 Assembler error at @function

I was porting a project to Windows using mingw32 and the project depends on a library called libfec. Libfec has a lot of assembly code to optimize the inner workings. In Linux (with GCC 5.4) the library compiles fine. Today I tried to compile it on windows using mingw32 (with as well gcc 5.4) and I got this error:

as   -o mmxbfly27.o mmxbfly27.s
mmxbfly27.s: Assembler messages:
mmxbfly27.s:10: Warning: .type pseudo-op used outside of .def/.endef ignored.
mmxbfly27.s:10: Error: junk at end of line, first unrecognized character is `u'
make: *** [mmxbfly27.o] Error 1

The warning about .type happens in Linux as well, but the Error doesn't. I checked the binutils and they're actually different (on linux it was 2.26 and in mingw was 2.25) but the code of libfec is a bit old (few years) and its compilable even with binutils 2.0.

I'm not sure why I can't compile this on windows. The full code is here:

https://github.com/quiet/libfec/blob/master/mmxbfly27.s

I asked a friend that has experience with compilers, and he couldn't find a problem in the code (and it does compile fine in linux).

Upvotes: 2

Views: 1034

Answers (1)

Lucas Teske
Lucas Teske

Reputation: 652

Ok so the solution was really simple: just comment the .type directive. The PECOFF doesn't need that. Now I'm able to compile and run just fine.

Upvotes: 4

Related Questions