aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2024-01-10 23:35:49 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-18 01:46:27 -0500
commitdcc6c863ed4e0198f9df590ea86554f550c42237 (patch)
tree12b08000dc208274976adcb0188b9ef110d70e4d /ld
parent9be58d07909ea72b3351e71121b00b63e3e0d7e7 (diff)
downloadbinutils-dcc6c863ed4e0198f9df590ea86554f550c42237.zip
binutils-dcc6c863ed4e0198f9df590ea86554f550c42237.tar.gz
binutils-dcc6c863ed4e0198f9df590ea86554f550c42237.tar.bz2
sim: ppc: switch register read/writes to union to avoid aliasing issues
This code creates a small buffer on the stack w/alloca, then proceeds to write to it with a cast to a pointer type based on the register type, then reads from it with a cast to a pointer type based on the register size. gcc will flags only one of these lines as "maybe used uninitialized", but it seems to track back to this memory abuse. Create a large union with all the possible types that this code will read or write as, and then use those. It's a bit ugly, but is probably better than using raw memcpy's everywhere.
Diffstat (limited to 'ld')
0 files changed, 0 insertions, 0 deletions