ld 2.11: unaligned memory access for unions
Eberhard Mattes
mattes@azu.informatik.uni-stuttgart.de
Thu Jun 21 03:01:00 GMT 2001
> I agree that the void * pointer needs to satisfy the alignment
> requirements of the struct, but I don't agree that the void * pointer
> needs to satisfy any more strict alignment requirements.
True. There's something strange going on: SYMENT's alignment is 1
(it's just a collection of char[]), so one of the two pointers passed
to memcpy doesn't have any alignment requirements, and memcpy() must
not copy word-by-word, even if the other pointer has strict enough
alignment requirements. When I wrote the bug report, I looked at the
assembly code and it used ldr/str (not ldrb/strb) instructions, so the
problem did exist. Anyway, I cannot recreate the problem. For now,
just consider the problem to not exist, I'll let you know when it
reappers.
Eberhard
More information about the Binutils
mailing list