[RuntimeDyld] Added support for relocation of indirect functions
authorMoritz Sichert <sichert@in.tum.de>
Wed, 20 Jan 2021 16:08:47 +0000 (17:08 +0100)
committerMoritz Sichert <sichert@in.tum.de>
Wed, 2 Nov 2022 09:46:11 +0000 (10:46 +0100)
commita667aa4de041816cb4865bce8f523228f2332ffa
treed9be1abd7aa22516cd72618b20d83f8949401bec
parent134bda4b61ac9f5fd0583989771be8736e3dbf83
[RuntimeDyld] Added support for relocation of indirect functions

In ELF, symbols of type STT_GNU_IFUNC need to be resolved by calling the
function at the symbol's address. This is implemented by adding special
stubs for all symbols of that type.

Differential Revision: https://reviews.llvm.org/D105465
llvm/include/llvm/Object/ELFObjectFile.h
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
llvm/test/ExecutionEngine/RuntimeDyld/X86/ELF_STT_GNU_IFUNC.s [new file with mode: 0644]