Provide a weak stub version of init_guest_commpage
instead of using the preprocessor.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
 linux-user/elfload.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 8ebde57fa5..01c39bf456 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -158,8 +158,6 @@ typedef abi_int         target_pid_t;
 #ifdef TARGET_X86_64
 #define ELF_CLASS      ELFCLASS64
 #define ELF_ARCH       EM_X86_64
-
-#define INIT_GUEST_COMMPAGE
 #else
 
 /*
@@ -1151,11 +1149,14 @@ static abi_ulong create_elf_tables(abi_ulong p, int 
argc, int envc,
 #else
 #define HI_COMMPAGE 0
 #define LO_COMMPAGE -1
-#ifndef INIT_GUEST_COMMPAGE
-#define init_guest_commpage() true
-#endif
 #endif
 
+bool __attribute__((weak)) init_guest_commpage(void)
+{
+    return true;
+}
+
+
 /**
  * pgb_try_mmap:
  * @addr: host start address
-- 
2.43.0


Reply via email to