From fb9578d76881172cb7cf68a1321674d2a68bba25 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 5 Sep 2023 13:56:29 +0200 Subject: [PATCH] uki: document section name size limit --- src/fundamental/uki.c | 4 ++++ 1 file changed, 4 insertions(+) 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", -- 2.47.3