[ipxe-devel] [PATCH] [efi] Use memcpy to handle efi header name
Michael Brown
mcb30 at ipxe.org
Sat Jul 7 19:03:39 UTC 2018
On 18/06/18 13:20, Michael Brown wrote:
> Yes, I will pick an appropriate patch and push it (with credits to
> everyone who has also supplied a fix).
>
> Thank you to everyone who's reported/fixed this.
I have pushed:
http://git.ipxe.org/ipxe.git/commitdiff/8ed4e3049
I spent some time trying to get __attribute__((nonstring)) to work, as
inspired by Olaf's patch. Unfortunately it seems that casting to a
pointer with __attribute__((nonstring)) doesn't work to silence the
warning, and the only working approach seemed to require Olaf's original
modification to PeImage.h. Since PeImage.h is imported from the EDK2
codebase, patching it isn't a viable option.
The EDK2 codebase has adopted the use of -Wno-stringop-truncation, so it
is unlikely that a future version of PeImage.h would specify
__attribute__((nonstring)) on the relevant field.
Ultimately, using -Wno-stringop-truncation seems to be the cleanest and
most maintainable solution.
Thanks to everyone who contributed, and sorry for the delay.
Michael
More information about the ipxe-devel
mailing list