[ELF/X86_64] Fix handling of R_X86_64_GOTTPOFF relocation.
The aforementioned relocation generate a GOT entry with a R_X86_64_TPOFF64. The new relocation is processed at startup time by the loader. lld didn't generate the outstanding relocation, now it does. This bug was found while trying to link ls(1) on FreeBSD. Simplified repro: #include <stdio.h> #include <wchar.h> #include <wctype.h> int main(void) { wchar_t wc = 98; if (!iswprint(wc)) printf("blah\n"); else printf("foo\n"); return (0); } which incorrectly outputs "blah" when linked with lld before this patch. llvm-svn: 233051
Loading
Please sign in to comment