[clang] [Clang][Interpreter] Force GOT access for external data references (PR #201286)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 4 01:43:34 PDT 2026


aokblast wrote:

> ```
>   // Clang emits direct PC-relative accesses for external data (e.g. C++
>   // type-info used by exception handling). As clang-repl directly mmap()s
>   // shared objects into memory, the target symbol may be more than 2GB away
>   // from the generated code, resulting in an out-of-range Delta32/PC32
>   // relocation. Force GOT-based access instead so the relocation remains
>   // within range.
> ```
> 
> We need to dig into how these accesses are getting generated. Provided that we configure the memory manager correctly the JIT should be able to handle arbitrary objects without requiring any special codegen settings.

Sorry, please ignore the previous comment. I falsely use GCC instead of clang. I will write some detail on failure case on FreeBSD later.

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


More information about the cfe-commits mailing list