
4 Jun
2013
4 Jun
'13
9:29 p.m.
On 05/22/2013 12:48 PM, Stephen Warren wrote:
From: Stephen Warren swarren@nvidia.com
Initialized character arrays on the stack can cause gcc to emit code that performs unaligned accessess. Make the data static to avoid this.
Note that the unaligned accesses are made when copying data to prefix[] on the stack from .rodata. By making the data static, the copy is completely avoided. All explicitly written code treats the data as u8[], so will never cause any unaligned accesses.
Tom, does this patch look good?
The discussion following it was unrelated to this patch, but rather related to pre-processing of device-trees, so I don't think should prevent this patch being merged.