scripts/gen_tee_bin.py: inlude .ctors in included sections
Includes the section .ctors in sections included in the pager binary.
This fixes a problem where the constructor function pointers are all
zeroes. Constructors are normally not used by OP-TEE, but with
CFG_CORE_SANITIZE_KADDRESS=y it's used to initialize access to global
variables.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/scripts/gen_tee_bin.py b/scripts/gen_tee_bin.py
index 32f347b..a4aa532 100755
--- a/scripts/gen_tee_bin.py
+++ b/scripts/gen_tee_bin.py
@@ -143,7 +143,7 @@
global tee_pager_bin
if tee_pager_bin is None:
pad_to = get_symbol(elffile, '__data_end')['st_value']
- dump_names = re.compile(r'^\.(text|nex_data|rodata|got|data|'
+ dump_names = re.compile(r'^\.(text|nex_data|rodata|ctors|got|data|'
r'data\.rel\.ro|ARM\.exidx|ARM\.extab)$')
tee_pager_bin = get_sections(elffile, pad_to, dump_names)