[CRIU] [PATCH 12/20] compel: rm COMPEL_H_PARASITE_* macros

Kir Kolyshkin kir at openvz.org
Thu Dec 8 01:44:25 PST 2016


They are no longer needed.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 compel/include/uapi/handle-elf.h | 8 --------
 compel/src/lib/handle-elf.c      | 6 +++---
 criu/pie/pie-relocs.h            | 2 --
 3 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/compel/include/uapi/handle-elf.h b/compel/include/uapi/handle-elf.h
index 013e2e4..ddeecb0 100644
--- a/compel/include/uapi/handle-elf.h
+++ b/compel/include/uapi/handle-elf.h
@@ -12,12 +12,4 @@ typedef struct {
 	long		value;
 } compel_reloc_t;
 
-/*
- * Helpers for compel hgen command results. The pref should match
- * the -p|--sym-prefix argument value.
- */
-#define COMPEL_H_PARASITE_HEAD(pref)	pref##__export_parasite_head_start
-#define COMPEL_H_PARASITE_CMD(pref)	pref##__export_parasite_cmd
-#define COMPEL_H_PARASITE_ARGS(pref)	pref##__export_parasite_args
-
 #endif
diff --git a/compel/src/lib/handle-elf.c b/compel/src/lib/handle-elf.c
index be7e212..3717371 100644
--- a/compel/src/lib/handle-elf.c
+++ b/compel/src/lib/handle-elf.c
@@ -592,11 +592,11 @@ int __handle_elf(void *mem, size_t size)
 			opts.prefix);
 	pr_out("\tpbd->hdr.nr_gotpcrel	= %s_nr_gotpcrel;\n", opts.prefix);
 	pr_out("\tpbd->hdr.parasite_ip_off	= "
-			"COMPEL_H_PARASITE_HEAD(%s_sym);\n", opts.prefix);
+			"%s_sym__export_parasite_head_start;\n", opts.prefix);
 	pr_out("\tpbd->hdr.addr_cmd_off	= "
-			"COMPEL_H_PARASITE_CMD(%s_sym);\n", opts.prefix);
+			"%s_sym__export_parasite_cmd;\n", opts.prefix);
 	pr_out("\tpbd->hdr.addr_arg_off	= "
-			"COMPEL_H_PARASITE_ARGS(%s_sym);\n", opts.prefix);
+			"%s_sym__export_parasite_args;\n", opts.prefix);
 	pr_out("\tpbd->hdr.relocs		= %s_relocs;\n", opts.prefix);
 	pr_out("\tpbd->hdr.nr_relocs	= "
 			"sizeof(%s_relocs) / sizeof(%s_relocs[0]);\n",
diff --git a/criu/pie/pie-relocs.h b/criu/pie/pie-relocs.h
index a96150a..442e70d 100644
--- a/criu/pie/pie-relocs.h
+++ b/criu/pie/pie-relocs.h
@@ -10,7 +10,6 @@
 
 #define pie_size(__pie_name)	(round_up(sizeof(__pie_name##_blob) + \
 			__pie_name ## _nr_gotpcrel * sizeof(long), page_size()))
-#define pie_nr_gotpcrel(__pie_name)	(__pie_name ## _nr_gotpcrel)
 #define ELF_RELOCS_APPLY(__pie_name, __mem, __vbase)			\
 	compel_relocs_apply(__mem, __vbase, sizeof(__pie_name##_blob),	\
 			 __pie_name##_relocs, ARRAY_SIZE(__pie_name##_relocs))
@@ -18,7 +17,6 @@
 #else
 
 #define pie_size(__pie_name)	(round_up(sizeof(__pie_name##_blob), page_size()))
-#define pie_nr_gotpcrel(__pie_name)	(0)
 #define ELF_RELOCS_APPLY(__pie_name, __mem, __vbase)
 
 #endif
-- 
2.7.4



More information about the CRIU mailing list