Skip to content
Commit 61c44f18 authored by Fangrui Song's avatar Fangrui Song
Browse files

[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
parent 057564fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment