Files
clang-p2996/llvm/lib/Target/X86/X86FastISel.cpp
Fangrui Song 61c44f1822 [X86] FastISel -fno-pic: emit R_386_PC32 when calling an intrinsic
This matches how a SelectionDAG::getExternalSymbol node is lowered. On x86-32, a
function call in -fno-pic code should emit R_386_PC32 (since ebx is not set up).
When linked as -shared (problematic!), the generated text relocation will work.

Ideally, we should mark IR intrinsics created in
CodeGenFunction::EmitBuiltinExpr as dso_local, but the code structure makes it
not very feasible.

Fix #51078
2023-09-10 15:03:36 -07:00

139 KiB