diff --git a/src/binary/elf.cpp b/src/binary/elf.cpp index db8ea40..f371a64 100644 --- a/src/binary/elf.cpp +++ b/src/binary/elf.cpp @@ -131,6 +131,10 @@ namespace detail { Result r = header.unwrap(); return std::ref(header.unwrap()); } + if(tried_to_load_header) { + return internal_error("previous header load failed " + object_path); + } + tried_to_load_header = true; if(is_64) { return get_header_info_impl<64>(); } else {