From 3000af03f49ee86fa17630a79849ead8407497fe Mon Sep 17 00:00:00 2001 From: Dmitri Makarov Date: Wed, 3 Nov 2021 15:48:20 -0700 Subject: [PATCH] [SOL] Override default getImplicitAddend implementation for BPF arch --- lld/ELF/Arch/BPF.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lld/ELF/Arch/BPF.cpp b/lld/ELF/Arch/BPF.cpp index 5611692d28590a..fbe5a8c1d7339e 100644 --- a/lld/ELF/Arch/BPF.cpp +++ b/lld/ELF/Arch/BPF.cpp @@ -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 @@ -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: {