forked from OSchip/llvm-project
15cba9e7e5
This patch fixes dynamic relocation creation from GOT access in dynamic objects on aarch64. Current code creates a plt relative one (R_AARCH64_JUMP_SLOT) instead of a got relative (R_AARCH64_GLOB_DAT). It leads the programs fails with: $ cat t.cc std::string test = "hello...\n"; int main () { printf ("%s\n", test.c_str()); return 0; } $ clang++ t.cc -fpic -o t $ ./t hello... Segmentation fault (core dumped) Due the fact it will try to access the plt instead of the got for __cxa_atexit registration for the std::string destruction. It will lead in a bogus function address in atexit. llvm-svn: 265784 |
||
---|---|---|
.. | ||
COFF | ||
Driver/Inputs | ||
ELF | ||
Unit | ||
darwin | ||
mach-o | ||
CMakeLists.txt | ||
lit.cfg | ||
lit.site.cfg.in |