[Gmecm] motorola 68k / cpu32 assembly

Jim Sturcbecher jimsturs
Wed Mar 21 08:46:31 UTC 2012


Hi Ant,

I hand wrote code for the 68k many years ago and had a similar problem.
Because the 68k is a 32bit processor, I had to ensure that all code and
data sections in my source started on a "word" boundary. I think your
linker is trying to do this for you and if your compiled code is not
aligned to a word boundary, then you will get this shift.

Just a possibility, try this and see is it fixes your problem.

Jim.


-----Original Message-----
From: gmecm-bounces at diy-efi.org [mailto:gmecm-bounces at diy-efi.org] On Behalf
Of Ant
Sent: 21 March 2012 09:26
To: GM-ECM
Subject: [Gmecm] motorola 68k / cpu32 assembly

Has anyone here attempted to assemble 32 bit motorola 68k code for an
'0411 pcm?

Im trying to use the sourcery codebench build of the gnu tools, but I
think the linker is buggy. 

If I use m68k-linux-gnu-objdump -r to view the relocations in the .o
file they check out correctly. But when I use the gnu linker to resolve
the relocs and spit out a .bin file, they are all off by 2. 

Its not a linker configuration error as if I offset the load address
of .text too offset addresses by 2 lots of other things break. 

tool versions are:

$ m68k-linux-gnu-as --version
GNU assembler (Sourcery CodeBench Lite 2011.09-22) 2.21.53.20110905

$ m68k-linux-gnu-ld --version
GNU ld (Sourcery CodeBench Lite 2011.09-22) 2.21.53.20110905

I'd be interested to hear from anyone who has written code by hand and
assembled with these tools.

Thanks,
Ant



_______________________________________________
Gmecm mailing list
Gmecm at diy-efi.org
http://lists.diy-efi.org/mailman/listinfo/gmecm




More information about the Gmecm mailing list