Index: ELF/InputSection.cpp =================================================================== --- ELF/InputSection.cpp +++ ELF/InputSection.cpp @@ -302,13 +302,6 @@ } } -// Page(Expr) is the page address of the expression Expr, defined -// as (Expr & ~0xFFF). (This applies even if the machine page size -// supported by the platform has a different value.) -static uint64_t getAArch64Page(uint64_t Expr) { - return Expr & (~static_cast(0xFFF)); -} - static uint32_t getARMUndefinedRelativeWeakVA(uint32_t Type, uint32_t A, uint32_t P) { switch (Type) { Index: ELF/Target.h =================================================================== --- ELF/Target.h +++ ELF/Target.h @@ -105,6 +105,7 @@ std::string toString(uint32_t RelType); uint64_t getPPC64TocBase(); +uint64_t getAArch64Page(uint64_t Expr); extern TargetInfo *Target; TargetInfo *createTarget(); Index: ELF/Target.cpp =================================================================== --- ELF/Target.cpp +++ ELF/Target.cpp @@ -1262,7 +1262,10 @@ write64le(Buf, In::Plt->getVA()); } -static uint64_t getAArch64Page(uint64_t Expr) { +// Page(Expr) is the page address of the expression Expr, defined +// as (Expr & ~0xFFF). (This applies even if the machine page size +// supported by the platform has a different value.) +uint64_t getAArch64Page(uint64_t Expr) { return Expr & (~static_cast(0xFFF)); }