From: Michael Brown Date: Wed, 30 Apr 2025 11:01:42 +0000 (+0100) Subject: [image] Move embedded images from .rodata to .data X-Git-Tag: rolling/bin~337 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3303910010071ad7b8fc92125d42e523aef5168d;p=thirdparty%2Fipxe.git [image] Move embedded images from .rodata to .data Decrypting a CMS-encrypted image will overwrite the existing image data in place, and using an encrypted embedded image is a valid use case. Move embedded images from .rodata to .data to reflect the fact that they are intended to be writable. Signed-off-by: Michael Brown --- diff --git a/src/image/embedded.c b/src/image/embedded.c index 3c4bee655..58833ac30 100644 --- a/src/image/embedded.c +++ b/src/image/embedded.c @@ -18,7 +18,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #define EMBED( _index, _path, _name ) \ extern char embedded_image_ ## _index ## _data[]; \ extern char embedded_image_ ## _index ## _len[]; \ - __asm__ ( ".section \".rodata\", \"a\", " PROGBITS "\n\t" \ + __asm__ ( ".section \".data\", \"aw\", " PROGBITS "\n\t" \ "\nembedded_image_" #_index "_data:\n\t" \ ".incbin \"" _path "\"\n\t" \ "\nembedded_image_" #_index "_end:\n\t" \