[all-commits] [llvm/llvm-project] 61c44f: [X86] FastISel -fno-pic: emit R_386_PC32 when call...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Sun Sep 10 15:03:50 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 61c44f1822d6c3dec0938b5b5a3dd300e856f44a
https://github.com/llvm/llvm-project/commit/61c44f1822d6c3dec0938b5b5a3dd300e856f44a
Author: Fangrui Song <i at maskray.me>
Date: 2023-09-10 (Sun, 10 Sep 2023)
Changed paths:
M llvm/lib/Target/X86/X86FastISel.cpp
M llvm/test/CodeGen/X86/fast-isel-call.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list