Robert Millan wrote:
I don't understand what you mean about a "Linux cross-compiler":
- Why a compiler? AFAICT, the problem here is assembly/linkage
rather than compiling. binutils should suffice.
Unfortunately this is not true:
Some assembly language directives generated by gcc differ between PE and
ELF. An ELF 'gas' does not accept assembly output from a PE 'gcc' and
vice versa. The whole toolchain must support ELF.
- It's not really "Linux", just generic ELF support (i.e.
i386-pc-elf rather than i386-pc-linux-gnu).
OK :-)
- It's not exactly "cross". I think something like
--enable-targets=i386-pc-elf when building binutils should
work just fine. This produces an "ld" that understands multiple
formats (-m switch). Have you tried this?
Cygwin binutils are build with this option:
$ ld --help
...
ld: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little
elf32-big srec symbolsrec tekhex binary ihex
But this does not help because ld refuses to build ELF output from PE
input. So you need an ELF gas. Which requires an ELF gcc...
I already described that here:
http://lists.gnu.org/archive/html/grub-devel/2007-11/msg00233.html
--
Regards,
Christian Franke
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel