From e3233a48243aa904d7869928536d0f9af618aa11 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 21 Jan 2021 10:59:19 +0100 Subject: [PATCH] ldso: turn deadlock message into Linker message Issue #3991 [init -> ...] Error: LD: jump slot relocation failed for symbol: 'XYZ' [init -> ...] Error: deadlock ahead, mutex=0x161860, return ip=0xeb870 turns into: [init -> ...] Error: LD: jump slot relocation failed for symbol: 'XYZ' [init -> ...] Error: Uncaught exception of type 'Linker::Not_found' [init -> ...] Warning: abort called - thread: ep Fixes #4002 --- repos/base/src/lib/ldso/main.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/repos/base/src/lib/ldso/main.cc b/repos/base/src/lib/ldso/main.cc index 9ac7c9f307..e57196dde8 100644 --- a/repos/base/src/lib/ldso/main.cc +++ b/repos/base/src/lib/ldso/main.cc @@ -292,12 +292,12 @@ struct Linker::Ld : private Dependency, Elf_object Elf::Addr Ld::jmp_slot(Dependency const &dep, Elf::Size index) { - Mutex::Guard guard(mutex()); - - if (verbose_relocation) - log("LD: SLOT ", &dep.obj(), " ", Hex(index)); - try { + Mutex::Guard guard(mutex()); + + if (verbose_relocation) + log("LD: SLOT ", &dep.obj(), " ", Hex(index)); + Reloc_jmpslot slot(dep, dep.obj().dynamic().pltrel_type(), dep.obj().dynamic().pltrel(), index); return slot.target_addr();