diff --git a/core/arch/arm/kernel/user_ta.c b/core/arch/arm/kernel/user_ta.c index 89d2917cf21..d873c244272 100644 --- a/core/arch/arm/kernel/user_ta.c +++ b/core/arch/arm/kernel/user_ta.c @@ -911,6 +911,13 @@ static TEE_Result set_exidx(struct user_ta_ctx *utc) TAILQ_FOREACH(elf, &utc->elfs, link) exidx_sz += elf->exidx_size; + if (!exidx_sz) { + /* The empty table from first segment will fit */ + utc->exidx_start = exe->exidx_start; + utc->exidx_size = exe->exidx_size; + return TEE_SUCCESS; + } + utc->mobj_exidx = alloc_ta_mem(exidx_sz); if (!utc->mobj_exidx) return TEE_ERROR_OUT_OF_MEMORY;