diff --git a/contrib/elftoolchain/libelf/elf_update.c b/contrib/elftoolchain/libelf/elf_update.c index 0c4471246475..9f5230d1df19 100644 --- a/contrib/elftoolchain/libelf/elf_update.c +++ b/contrib/elftoolchain/libelf/elf_update.c @@ -1212,5 +1212,6 @@ elf_update(Elf *e, Elf_Cmd c) done: _libelf_release_extents(&extents); + e->e_flags &= ~LIBELF_F_SHDRS_LOADED; return (rc); }