Skip to content

Commit

Permalink
[SOL] Revert to R_BPF_64_32 until support for R_BPF_64_ABS32 added
Browse files Browse the repository at this point in the history
  • Loading branch information
dmakarov committed Nov 18, 2021
1 parent 9743d18 commit d9d227e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lldb-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:

jobs:
build_lldb:
if: false
name: lldb build
runs-on: ${{ matrix.os }}
# Workaround for build faliure on Mac OS X: llvm.org/PR46190, https://github.com/actions/virtual-environments/issues/2274
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ unsigned BPFELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target,
// CALL instruction.
return ELF::R_BPF_64_32;
case FK_Data_8:
return ELF::R_BPF_64_64;
return isSolana ? ELF::R_BPF_64_64 : ELF::R_BPF_64_ABS64;
case FK_Data_4:
if (const MCSymbolRefExpr *A = Target.getSymA()) {
const MCSymbol &Sym = A->getSymbol();
Expand Down Expand Up @@ -94,7 +94,7 @@ unsigned BPFELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target,
}
}
}
return ELF::R_BPF_64_ABS32;
return isSolana ? ELF::R_BPF_64_32 : ELF::R_BPF_64_ABS32;
}
}

Expand Down

0 comments on commit d9d227e

Please sign in to comment.