[JITLink][ELF][x86-64] Add support for R_X86_64_GOTPC32 relocation.
Adds support for the R_X86_64_GOTPC32 relocation, which is a 32-bit delta to the global offset table. Since the delta to the GOT doesn't actually require any GOT entries to exist this commit adds an extra fallback path to the getOrCreateGOTSymbol function: If the symbol is in the extenal symbols list but no entry exists then the symbol is turned into an absolute symbol pointing to an arbitrary address in the current graph's allocation (accessing this address via the symbol would be illegal, but any access should have triggered creation of a GOT entry which would prevent this fallback path from being taken in the first place). This commit also updates the llvm-jitlink tool to scrape the addresses of the absolute symbols in the graph so that the testcase can see the now-absolute _GLOBAL_OFFSET_TABLE_ symbol.
Loading
Please sign in to comment