From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS Date: Fri, 10 Mar 2017 11:30:32 +0100 Message-ID: <1489141832-3754-1-git-send-email-clg@kaod.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Thomas Huth , Laurent Vivier , Drew Jones , kvm-ppc@vger.kernel.org, Paolo Bonzini , rkrcmar@redhat.com, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: kvm@vger.kernel.org Return-path: Received: from 8.mo68.mail-out.ovh.net ([46.105.74.219]:39146 "EHLO 8.mo68.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934844AbdCJKax (ORCPT ); Fri, 10 Mar 2017 05:30:53 -0500 Received: from player789.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo68.mail-out.ovh.net (Postfix) with ESMTP id 95119452A5 for ; Fri, 10 Mar 2017 11:30:51 +0100 (CET) Sender: kvm-owner@vger.kernel.org List-ID: ld 2.28 complains with : ld -EL -nostdlib -pie -o powerpc/selftest.elf \ -T powerpc/flat.lds --build-id=none \ powerpc/selftest.o powerpc/cstart64.o powerpc/reloc64.o lib/libcflat.a lib/libfdt/libfdt.a powerpc/selftest.aux.o ld: powerpc/selftest.elf: Not enough room for program headers, try linking with -N ld: final link failed: Bad value Fix that by turning off page alignment of sections with option '-n' Signed-off-by: Cédric Le Goater --- powerpc/Makefile.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common index 37f8caa720b7..1869f449b9ac 100644 --- a/powerpc/Makefile.common +++ b/powerpc/Makefile.common @@ -42,7 +42,7 @@ cflatobjs += lib/powerpc/smp.o FLATLIBS = $(libcflat) $(LIBFDT_archive) %.elf: CFLAGS += $(arch_CFLAGS) -%.elf: LDFLAGS = $(arch_LDFLAGS) -nostdlib -pie +%.elf: LDFLAGS = $(arch_LDFLAGS) -nostdlib -pie -n %.elf: %.o $(FLATLIBS) powerpc/flat.lds $(cstart.o) $(reloc.o) $(CC) $(CFLAGS) -c -o $(@:.elf=.aux.o) lib/auxinfo.c -DPROGNAME=\"$@\" $(LD) $(LDFLAGS) -o $@ \ -- 2.7.4