I posted http://www.mail-archive.com/bug-binutils@gnu.org/msg08677.html on Wed, 09 Dec 2009 14:12:16 -0800
and Alan Modra very kindly advised that I needed to final link the file. Since that time I have been unable to reproduce the output with 64bit binutils. I've also tried a couple of forums. The nearest I've got is this i.e. .text _start: .global _start #keeps ld happy .int blob blob: as --32 -o test.o test.s ld -melf_i386 test.o objcopy -O binary a.out a.com hte a.com produces 00000000 | 58 80 04 08 wich I think is a problem 'cos I was hoping for 00000000 | 04 00 00 00 The reason for this is that the actual code I want to build, rather than this tiny example, is a standalone forth image. Once the bootloader has executed from 0x7c00 and loaded everything into memory it relocates the whole lot so that it starts at memory address 0x0. As such I can't help feeling that all addresses should be based on the presumption that the start of the file is address 0. If someone could please demonstrate how to get the same 32 bit result or a commensurate result (a 64bit ,com) that would jump to the right places from address 0x0 in memory I'd really appreciate it. On the other hand perhaps 58 80 04 08 is the right result and I'm just not interpreting it correctly. As always any help much appreciated. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils