[RuntimeDyld][ELF] Fixed relocations referencing undefined TLS symbols
authorMoritz Sichert <sichert@in.tum.de>
Wed, 8 Feb 2023 10:47:32 +0000 (11:47 +0100)
committerMoritz Sichert <sichert@in.tum.de>
Wed, 8 Feb 2023 16:49:53 +0000 (17:49 +0100)
commitcb19b83baac1a204cb61e7fd7c8f22dac886ce39
tree4979d7a44c3870d630351e561e87676ec34b7fa0
parente1b5014119c027bff4d2784c18d5d1fda3676f13
[RuntimeDyld][ELF] Fixed relocations referencing undefined TLS symbols

The classification of TLS symbols in ELF was changed from ST_Data to
ST_Other in the following commit:
018a484cd26d72fb4c9e7fd75e5f5bc7838dfc73

RuntimeDyldELF::processRelocationRef() needs to be updated to also
handle ST_Other symbols so that it handles TLS relocations correctly.
The current tests did not fail because we have a shortcut for global
symbols that are already defined.

Differential Revision: https://reviews.llvm.org/D143568
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
llvm/test/ExecutionEngine/RuntimeDyld/X86/TLS.s