Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ELF] Remove R_X86_64_{TLSLD,TPOFF32,TPOFF64} error checks
Compiler should not emit these types of relocations unless it knows they will never refer imported symbols. However, it looks like GCC 7 emits these relocations against global symbols with STB_GNU_UNIQUE attribute, which can be resolved to a symbol in other ELF module at runtime. It looks like the bug only exists in GCC 7 and fixed in recent versions of GCC. mold verifies the above conditions and reports an error if the condition is violated. On the other hand, GNU ld and LLVM lld don't verify and simply create a shared library that is not always guaranteed to work. Give this situation, I decided to simply remove the verification code from mold. This is what other linkers do, and it make mold "compatible" with GCC 7. Fixes #145
- Loading branch information