diff options
Diffstat (limited to 'lld/ELF/Target.h')
| -rw-r--r-- | lld/ELF/Target.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lld/ELF/Target.h b/lld/ELF/Target.h index f7b947ec3aa2..e002114f8439 100644 --- a/lld/ELF/Target.h +++ b/lld/ELF/Target.h @@ -227,6 +227,8 @@ class AArch64Relaxer { public: explicit AArch64Relaxer(ArrayRef<Relocation> relocs); + bool tryRelaxAdrpAdd(const Relocation &adrpRel, const Relocation &addRel, + uint64_t secAddr, uint8_t *buf) const; bool tryRelaxAdrpLdr(const Relocation &adrpRel, const Relocation &ldrRel, uint64_t secAddr, uint8_t *buf) const; }; @@ -298,4 +300,25 @@ inline void write64(void *p, uint64_t v) { } // namespace elf } // namespace lld +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" +#endif +#define invokeELFT(f, ...) \ + switch (config->ekind) { \ + case ELF32LEKind: \ + f<ELF32LE>(__VA_ARGS__); \ + break; \ + case ELF32BEKind: \ + f<ELF32BE>(__VA_ARGS__); \ + break; \ + case ELF64LEKind: \ + f<ELF64LE>(__VA_ARGS__); \ + break; \ + case ELF64BEKind: \ + f<ELF64BE>(__VA_ARGS__); \ + break; \ + default: \ + llvm_unreachable("unknown config->ekind"); \ + } + #endif |
