diff options
| -rw-r--r-- | stand/common/load_elf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c index b9f55a21e403..1b5f1daded09 100644 --- a/stand/common/load_elf.c +++ b/stand/common/load_elf.c @@ -725,7 +725,8 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, uint64_t off) if (shstr) { for (i = 0; i < ehdr->e_shnum; i++) { if (strcmp(shstr + shdr[i].sh_name, - ".ctors") != 0) + ".ctors") != 0 && + shdr[i].sh_type != SHT_INIT_ARRAY) continue; ctors = shdr[i].sh_addr; file_addmetadata(fp, MODINFOMD_CTORS_ADDR, |
