[lld] [ELF] Add target-specific relocation scanning for x86 (PR #178846)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 21:26:56 PST 2026


MaskRay wrote:

> Hi @MaskRay, this leads to linker errors in a small binary (but quite a special one, and only in msan). Looks like something with signed/unsigned error:
> 
> ```
> ... relocation R_X86_64_GOTTPOFF out of range: 4315591089 is not in [-2147483648, 2147483647]; references '__msan_param_tls'
> >>> referenced by sysinfo.cc:44 (/proc/self/cwd/third_party/tcmalloc/internal/sysinfo.cc:44)
> ```
> 
> I don't have a standalone reproducer yet, but maybe you have some thoughts based on the error message?

I don't find anything suspicious. R_X86_64_GOTTPOFF is a TLS Initial-Exec model relocation. The old and new behaviors look identical to me.

https://github.com/llvm/llvm-project/pull/178846


More information about the llvm-commits mailing list