Re: Startup problem on ARM
On Wed, 24 Nov 1999, Godmar Back wrote: > a) You can check what alignment your tools are configured for by compiling > and running kaffe/developers/alignment_of_size.c. This must match what > Kaffe assumes internally. Thanks for the feedback! This is what alignment_of_size says: $ ./alignment_of_size alignment ofChar with size 1 -> 1 alignment of Short with size 2 -> 2 alignment of Int with size 4 -> 4 alignment of Float with size 4 -> 4 alignment ofLongLong with size 8 -> 4 alignment of Double with size 8 -> 4 alignment of CharStruct with size 4 -> 4 alignment of ShortStruct with size 4 -> 4 alignment of IntStruct with size 4 -> 4 alignment of FloatStruct with size 4 -> 4 alignment ofDoubleStruct with size 8 -> 4 alignment of LongStruct with size 8 -> 4 And the ALIGNMEMENT_OF_SIZE macro in config/arm/common.h says #define ALIGNMENT_OF_SIZE(S) ((S) < 4 ? (S) : 4) So if kaffe's internal use of size alignment is based on this macro I guess they match, right? /Stefan
Re: Startup problem on ARM
> > > Stefan Hellkvist wrote: > | My name is Stefan and I'm trying to get kaffe 1.0.5 working on a > | Netwinder (ARM-linux). I'm using the debian disk image (small > | image with kernel 2.2.10). I built Kaffe without the JIT and it built ok but > | when I run a simple Hello world program it crashes in the startup > | process like this: > > There are many versions of the ARM processor out there. Early versions of > the ARM did not support byte and 16-bit load/store instructions, so C > char/short were 32-bit aligned on those versions. Java's byte and short > are likewise aligned. > > Later versions of the ARM (such as the Netwinder's StrongARM) have byte > load/store instructions so they don't have these restrictions. > > With this in mind, determine which structure padding convention is in use > by your system and investigate from there. > To add to what Dave said: a) You can check what alignment your tools are configured for by compiling and running kaffe/developers/alignment_of_size.c. This must match what Kaffe assumes internally. b) More info about alignment on the arm than you ever wanted to know: The ARM alignment FAQ http://www.netwinder.org/~brianbr/alignment.html - Godmar
Re: Startup problem on ARM
Stefan Hellkvist wrote: | My name is Stefan and I'm trying to get kaffe 1.0.5 working on a | Netwinder (ARM-linux). I'm using the debian disk image (small | image with kernel 2.2.10). I built Kaffe without the JIT and it built ok but | when I run a simple Hello world program it crashes in the startup | process like this: There are many versions of the ARM processor out there. Early versions of the ARM did not support byte and 16-bit load/store instructions, so C char/short were 32-bit aligned on those versions. Java's byte and short are likewise aligned. Later versions of the ARM (such as the Netwinder's StrongARM) have byte load/store instructions so they don't have these restrictions. With this in mind, determine which structure padding convention is in use by your system and investigate from there.