From 968b68f343c0971f486b42a31239301ed8daacd9 Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Mon, 14 Aug 2023 18:33:25 +0300 Subject: [PATCH] plat/common: Align TLS sections to PAGE_SIZE `mkbootinfo.py` takes each ELF segment and aligns it to PAGE_SIZE to convert it to a `struct ukplat_memregion_desc`. However, this ends up generating overlapping memregion descriptors in the case of the ELF segment corresponding to the TLS sections. To solve this, simply ensure that the TLS sections are already aligned by PAGE_SIZE. Signed-off-by: Sergiu Moga Reviewed-by: Michalis Pappas Reviewed-by: Marco Schlumpp Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #1050 --- plat/common/include/uk/plat/common/common.lds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plat/common/include/uk/plat/common/common.lds.h b/plat/common/include/uk/plat/common/common.lds.h index dae12630d..28dabf021 100644 --- a/plat/common/include/uk/plat/common/common.lds.h +++ b/plat/common/include/uk/plat/common/common.lds.h @@ -137,7 +137,7 @@ } #define TLS_SECTIONS \ - . = ALIGN(0x20); \ + . = ALIGN(__PAGE_SIZE); \ _tls_start = .; \ .tdata : \ { \ -- 2.39.5