[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
Loading
Please sign in to comment