This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ld 2.11: unaligned memory access for unions


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]