lib/elf: Panic if ELF file contains DT_NEEDED tags
diff --git a/common/lib/elf.c b/common/lib/elf.c
index 623a2aa3..de589baf 100644
--- a/common/lib/elf.c
+++ b/common/lib/elf.c
@@ -313,6 +313,8 @@ static bool elf64_apply_relocations(uint8_t *elf, struct elf64_hdr *hdr, void *b
case DT_JMPREL:
dt_jmprel = dyn->d_un;
break;
+ case DT_NEEDED:
+ panic(true, "elf: ELF file attempts to load a dynamically linked library");
}
}
