diff --git a/options/rtdl/generic/linker.cpp b/options/rtdl/generic/linker.cpp index 92ebadb8f0..fb5e850a87 100644 --- a/options/rtdl/generic/linker.cpp +++ b/options/rtdl/generic/linker.cpp @@ -1530,6 +1530,15 @@ void Loader::_processRelocations(Relocation &rel) { rel.relocate(rel.object()->baseAddress + rel.addend_rel()); } break; +// TODO: R_IRELATIVE also exists on other architectures but will likely need a different implementation. +#if defined(__x86_64__) + case R_IRELATIVE: { + uintptr_t addr = rel.object()->baseAddress + rel.addend_rel(); + uintptr_t (*fn)() = reinterpret_cast(addr); + rel.relocate(fn()); + } break; +#endif + // DTPMOD and DTPREL are dynamic TLS relocations (for __tls_get_addr()). // TPOFF is a relocation to the initial TLS model. case R_TLS_DTPMOD: {