[CRIU] [PATCH] s390: Prevent GOT relocations
Andrei Vagin
avagin at virtuozzo.com
Tue Jul 18 05:23:50 MSK 2017
Applied, thanks!
On Fri, Jul 14, 2017 at 11:23:26AM +0200, Michael Holzheu wrote:
> Use the "-fno-optimize-sibling-calls" gcc option to prevent GOT relocations
> caused by gcc versions without the commit "S/390: Fix 64 bit sibcall":
>
> * https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=233169
>
> Otherwise we get compile errors like:
>
> GEN criu/pie/parasite-blob.h
> Error (compel/src/lib/handle-elf-host.c:572):
> Unsupported relocation of type 26
>
> Those can be caused by the following relocation types:
>
> * R_390_GOTENT (e.g. RHEL7 based systems)
> * R_390_GOTPCDBL (e.g. Debian Jessie)
> * R_390_GOT12 (e.g. Debian Jessie)
>
> Signed-off-by: Michael Holzheu <holzheu at linux.vnet.ibm.com>
> ---
> Makefile.compel | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile.compel b/Makefile.compel
> index 9b40079..5c854e3 100644
> --- a/Makefile.compel
> +++ b/Makefile.compel
> @@ -71,10 +71,12 @@ compel-install-targets += compel/$(LIBCOMPEL_SO)
> compel-install-targets += compel/compel
> compel-install-targets += $(compel-plugins)
>
> -# We assume that compel code does not change floating point registers.
> -# On s390 gcc uses fprs to cache gprs. Therefore disable floating point
> -# with -msoft-float.
> +#
> +# Also ensure with -fno-optimize-sibling-calls that we don't create GOT
> +# (Global Offset Table) relocations with gcc compilers that don't have
> +# commit "S/390: Fix 64 bit sibcall".
> +#
> ifeq ($(ARCH),s390)
> -CFLAGS += -msoft-float
> -HOSTCFLAGS += -msoft-float
> +CFLAGS += -msoft-float -fno-optimize-sibling-calls
> +HOSTCFLAGS += -msoft-float -fno-optimize-sibling-calls
> endif
> --
> 2.7.4
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list