Question regarding assembly

So here I am trying to get iPXE to compile on Windows using MingW-64, things were going very well but now I've hit a wall. It seems that "as.exe" doesn't like something or another about the assembly code that is being used in this project and it's giving me back crap like this:


C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s: Assembler messages:
C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s:21: Error: junk at end of line, first unrecognized character is `"'
C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s:37: Error: unknown pseudo-op: `.previous'
C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s:85: Error: junk at end of line, first unrecognized character is `"'
C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s:101: Error: unknown pseudo-op: `.previous'
C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s:131: Error: junk at end of line, first unrecognized character is `"'
C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s:147: Error: unknown pseudo-op: `.previous'
C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s:191: Error: can't resolve `' { section} - `LFB4' {.text$null_san_hook section}
C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s:207: Error: can't resolve `' { section} - `LFB6' {.text$null_san_boot section}
C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s:215: Error: can't resolve `' { section} - `LFB7' {.text$null_san_describe section}
C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s:244: Error: can't resolve `' { section} - `LFB4' {.text$null_san_hook section}
C:\Users\Home\AppData\Local\Temp\cc7CjJ7J.s:298: Error: can't resolve `' { section} - `LFB6' {.text$null_san_boot section}


The failure occurs while building "./ipxe/src/bin/null_sanboot.o".

Now I've done some research on my own and I've found that the documentation for the '.previous' command indicates that it is an ELF format command, but I would have thought MingW would have accounted for that. I can't think of a reason that it would be unknown to the assembly tool. Even if it isn't compatible with Windows I don't see why it would matter, from my limited ability in assembly the files that it is working with (mostly in "./ipxe/src/arch/i368/prefix/") are just laying out the format for the resulting binary in memory. It's not like Windows actually runs it at any point.

I have modified the default Makefile for this project, mostly muting '-Werror' in Makefile.houskeeping, because it was failing due to unused variables and functions, and changing the tool locations to string literals to ensure that the correct ones are being used. Other then that, in order to work with MingW64, any function attributes that were defined as: __attribute__ ((printf)) had to be changed over to __attribute__((GNU_printf)) and instances of the typeof macro had to be changed to __typeof__. There might be one or two more tweeks but if there are then they were too simple for me to write down in my notes.

I would appreciate any help with this. Complete shots in the dark are also welcome. I know that I could probably get this done and over with by building it in a *nix VM, but I feel like with a bit of help I can get this done on Win 8 of all platforms. Thank you.
Last edited on
Topic archived. No new replies allowed.