Skip to content

Commit

Permalink
[SOL] Override default getImplicitAddend implementation for BPF arch
Browse files Browse the repository at this point in the history
  • Loading branch information
dmakarov committed Nov 3, 2021
1 parent 57a0303 commit 3000af0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lld/ELF/Arch/BPF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class BPF final : public TargetInfo {
RelExpr getRelExpr(RelType type, const Symbol &s,
const uint8_t *loc) const override;
RelType getDynRel(RelType type) const override;
int64_t getImplicitAddend(const uint8_t *buf, RelType type) const override;
void relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const override;
};
} // namespace
Expand Down Expand Up @@ -56,6 +57,10 @@ RelType BPF::getDynRel(RelType type) const {
return type;
}

int64_t BPF::getImplicitAddend(const uint8_t *buf, RelType type) const {
return 0;
}

void BPF::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const {
switch (rel.type) {
case R_BPF_64_32: {
Expand Down

0 comments on commit 3000af0

Please sign in to comment.