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
This commit is contained in:
Alexander Boettcher 2021-01-21 10:59:19 +01:00 committed by Norman Feske
parent 5c5d16f524
commit e3233a4824

View File

@ -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();