From 68c9d33e943dbab01a0ff4bc5a3f65556ab25679 Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Sun, 26 Jan 2025 23:22:03 -0600 Subject: [PATCH] Use tried_to_load_header --- src/binary/elf.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 {