llvm-project
3fd4d1fa - [BOLT][ICP] Use PC-relative instructions for x86 PIC binaries in ICP (#216587)

Commit
71 days ago
[BOLT][ICP] Use PC-relative instructions for x86 PIC binaries in ICP (#216587) Currently, BOLT x86 ICP optimization inserts an immediate-to-register comparison instruction, which forces the use of 32-bit signed (32S) relocations due to ABI limitations. This behavior does not align well with the conventions of PIC/PIE binaries and **makes it highly prone to JITLink relocation overflow errors when dealing with large binaries.** Therefore, this patch introduces an additional lea instruction for the x86 architecture to leverage PC-relative (32PC) addressing. This change is intended to apply by default to PIC binaries, or when specific options are provided.
Author
Parents
Loading