[CRIU] [PATCH 04/10] zdtm/vdso01: move vdso_symbols upper

Dmitry Safonov dsafonov at virtuozzo.com
Thu Feb 16 08:20:39 PST 2017


Remove not needed VDSO_SYMBOL_*_NAME defines.

Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 test/zdtm/static/vdso01.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/test/zdtm/static/vdso01.c b/test/zdtm/static/vdso01.c
index 9572c174c162..d4ff920ad3cc 100644
--- a/test/zdtm/static/vdso01.c
+++ b/test/zdtm/static/vdso01.c
@@ -51,10 +51,12 @@ enum {
 	VDSO_SYMBOL_MAX
 };
 
-#define VDSO_SYMBOL_CLOCK_GETTIME_NAME	"__vdso_clock_gettime"
-#define VDSO_SYMBOL_GETCPU_NAME		"__vdso_getcpu"
-#define VDSO_SYMBOL_GETTIMEOFDAY_NAME	"__vdso_gettimeofday"
-#define VDSO_SYMBOL_TIME_NAME		"__vdso_time"
+const char *vdso_symbols[VDSO_SYMBOL_MAX] = {
+	[VDSO_SYMBOL_CLOCK_GETTIME]	= "__vdso_clock_gettime",
+	[VDSO_SYMBOL_GETCPU]		= "__vdso_getcpu",
+	[VDSO_SYMBOL_GETTIMEOFDAY]	= "__vdso_gettimeofday",
+	[VDSO_SYMBOL_TIME]		= "__vdso_time",
+};
 
 struct vdso_symtable {
 	unsigned long		vma_start;
@@ -116,13 +118,6 @@ static int vdso_fill_symtable(char *mem, size_t size, struct vdso_symtable *t)
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 	};
 
-	const char *vdso_symbols[VDSO_SYMBOL_MAX] = {
-		[VDSO_SYMBOL_CLOCK_GETTIME]	= VDSO_SYMBOL_CLOCK_GETTIME_NAME,
-		[VDSO_SYMBOL_GETCPU]		= VDSO_SYMBOL_GETCPU_NAME,
-		[VDSO_SYMBOL_GETTIMEOFDAY]	= VDSO_SYMBOL_GETTIMEOFDAY_NAME,
-		[VDSO_SYMBOL_TIME]		= VDSO_SYMBOL_TIME_NAME,
-	};
-
 	char *dynsymbol_names;
 	unsigned int i, j, k;
 
-- 
2.11.1



More information about the CRIU mailing list