From 406bc790cdf814c3f83c3e1323339fe67f3ae6f9 Mon Sep 17 00:00:00 2001 From: Zhou Kang Date: Wed, 28 Jun 2023 02:15:35 +0000 Subject: [PATCH] fix compile error --- src/elf_link_common.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/elf_link_common.h b/src/elf_link_common.h index d8b21ce..4c6092c 100644 --- a/src/elf_link_common.h +++ b/src/elf_link_common.h @@ -11,6 +11,17 @@ #include #include +// aarch64 header file is not define PAGE_SIZE +#ifndef PAGE_SHIFT +#define PAGE_SHIFT 12 +#endif +#ifndef PAGE_SIZE +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#endif +#ifndef PAGE_MASK +#define PAGE_MASK (~(PAGE_SIZE-1)) +#endif + #define ELF_SEGMENT_ALIGN (0x200000) #define SKIP_ONE_RELA (1) -- Gitee