From: Lennart Poettering Date: Tue, 5 Sep 2023 11:56:29 +0000 (+0200) Subject: uki: document section name size limit X-Git-Tag: v255-rc1~583 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb9578d76881172cb7cf68a1321674d2a68bba25;p=thirdparty%2Fsystemd.git uki: document section name size limit --- diff --git a/src/fundamental/uki.c b/src/fundamental/uki.c index ec37d74e035..b1fa0448134 100644 --- a/src/fundamental/uki.c +++ b/src/fundamental/uki.c @@ -5,6 +5,10 @@ #include "uki.h" const char* const unified_sections[_UNIFIED_SECTION_MAX + 1] = { + /* These section names must fit in 8ch (excluding any trailing NUL) as per PE spec for executables: + * https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#section-table-section-headers + * (Note that PE *object* files may have longer section names (via indirection in the string table) but + * this is not allowed for PE *executables*, which UKIs are.) */ [UNIFIED_SECTION_LINUX] = ".linux", [UNIFIED_SECTION_OSREL] = ".osrel", [UNIFIED_SECTION_CMDLINE] = ".cmdline",