diff options
Diffstat (limited to 'lld/ELF/Target.h')
-rw-r--r-- | lld/ELF/Target.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lld/ELF/Target.h b/lld/ELF/Target.h index 9f06051..90d8ddf 100644 --- a/lld/ELF/Target.h +++ b/lld/ELF/Target.h @@ -24,6 +24,7 @@ namespace elf { class Defined; class InputFile; class Symbol; +template <class RelTy> struct Relocs; std::string toStr(Ctx &, RelType type); @@ -87,6 +88,15 @@ public: virtual bool inBranchRange(RelType type, uint64_t src, uint64_t dst) const; + // Function for scanning relocation. Typically overridden by targets that + // require special type or addend adjustment. + virtual void scanSection(InputSectionBase &); + // Called by scanSection as a default implementation for specific ELF + // relocation types. + template <class ELFT> void scanSection1(InputSectionBase &); + template <class ELFT, class RelTy> + void scanSectionImpl(InputSectionBase &, Relocs<RelTy>); + virtual void relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const = 0; void relocateNoSym(uint8_t *loc, RelType type, uint64_t val) const { |