Port-amiga archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: elf2bb is not sparc64 host compatible (yet)
gni%gecko.de@localhost (Gunther Nikl) writes:
>> *((u_int32_t *)(base +
>> htobe32(ra->r_offset))) =
> Can you please explain why sparc64 doesn't like the original code? Its not
> obvious for me.
This is a cross build on sparc64 for m68k.
Sparc64 and m68k don't have the same alignment rules.
base is a malloc'd area that is aligned for all purposes.
ra->r_offset is not necessariliy a multiple of 4.
base + htobe32(ra->r_offset) is therefore not longword aligned.
Writing to that address via a u_int32_t* on sparc64 causes a bus error.
--
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index