[CRIU] [PATCH] pie: relocs -- Fix compilation on ARM
Pavel Emelyanov
xemul at parallels.com
Tue Jun 9 13:26:06 PDT 2015
On 06/09/2015 10:43 AM, Cyrill Gorcunov wrote:
> | parasite-syscall.c: In function ‘parasite_infect_seized’:
> | parasite-syscall.c:1222:5: error: ‘elf_relocs’ undeclared (first use in this function)
>
> Reported-by: Andrey Vagin <avagin at openvz.org>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> pie/pie-relocs.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/pie/pie-relocs.h b/pie/pie-relocs.h
> index 96f2bc9f2044..c533def6bf5d 100644
> --- a/pie/pie-relocs.h
> +++ b/pie/pie-relocs.h
> @@ -11,7 +11,9 @@
> extern __maybe_unused void elf_relocs_apply(void *mem, void *vbase, size_t size, elf_reloc_t *elf_relocs, size_t nr_relocs);
> #else
> #define PIE_SIZE(__blob_name) (round_up(sizeof(__blob_name), PAGE_SIZE))
> -static always_inline void elf_relocs_apply(void *mem, void *vbase, size_t size, elf_reloc_t *elf_relocs, size_t nr_relocs) { }
> +#define elf_relocs
> +#define nr_relocs
> +#define elf_relocs_apply(mem, vbase, size, elf_relocs, nr_relocs)
This routine is called two times with last two arguments being the same -- elf_relocs
and sizeof(elf_relocs). Why can't we stop treating them as arguments and just reference
in the elf_relocs_apply as (global) variables?
> #endif
>
> #endif /* __PIE_RELOCS_H__ */
>
More information about the CRIU
mailing list