[CRIU] [PATCH 03/20] criu/pie/vdso: change CONFIG_{X86_32 => VDSO_32}
Dmitry Safonov
dsafonov at virtuozzo.com
Fri Dec 2 11:53:27 PST 2016
It's needed for ELF magic, not for platform.
Will help to simplify Makefile.library (the very next patch).
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
criu/include/util-vdso.h | 4 ++--
criu/pie/Makefile.library | 2 +-
criu/pie/util-vdso.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/criu/include/util-vdso.h b/criu/include/util-vdso.h
index 63bc70d79f3e..f4ee7fef6a0c 100644
--- a/criu/include/util-vdso.h
+++ b/criu/include/util-vdso.h
@@ -49,7 +49,7 @@ struct vdso_symtable {
}, \
}
-#ifdef CONFIG_X86_32
+#if defined(CONFIG_X86_32) || defined(CONFIG_VDSO_32)
#define Ehdr_t Elf32_Ehdr
#define Sym_t Elf32_Sym
@@ -88,7 +88,7 @@ static inline unsigned long vvar_vma_size(struct vdso_symtable *t)
return t->vvar_end - t->vvar_start;
}
-#if defined(CONFIG_X86_32)
+#if defined(CONFIG_VDSO_32)
# define vdso_fill_symtable vdso_fill_symtable_compat
#endif
diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library
index f928c865571b..c011508c5a57 100644
--- a/criu/pie/Makefile.library
+++ b/criu/pie/Makefile.library
@@ -13,7 +13,7 @@ ifeq ($(ARCH),x86)
endif
CFLAGS_native += -DCONFIG_X86_64
CFLAGS_compat += -fno-pic -m32 -DCONFIG_X86_32
- CFLAGS_util-vdso-elf32.o += -DCONFIG_X86_32
+ CFLAGS_util-vdso-elf32.o += -DCONFIG_VDSO_32
OBJS += ./$(ARCH_DIR)/memcpy.o
endif
diff --git a/criu/pie/util-vdso.c b/criu/pie/util-vdso.c
index 44e4b89646af..c02187c366a1 100644
--- a/criu/pie/util-vdso.c
+++ b/criu/pie/util-vdso.c
@@ -67,7 +67,7 @@ static int has_elf_identity(Ehdr_t *ehdr)
/*
* See Elf specification for this magic values.
*/
-#if defined(CONFIG_X86_32)
+#if defined(CONFIG_VDSO_32)
static const char elf_ident[] = {
0x7f, 0x45, 0x4c, 0x46, 0x01, 0x01, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--
2.10.2
More information about the CRIU
mailing list