public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: kvm@vger.kernel.org, Thomas Huth <thuth@redhat.com>,
	Laurent Vivier <lvivier@redhat.com>,
	Drew Jones <drjones@redhat.com>,
	kvm-ppc@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS
Date: Wed, 15 Mar 2017 18:11:12 +0100	[thread overview]
Message-ID: <20170315171111.GD14081@potion> (raw)
In-Reply-To: <1489141832-3754-1-git-send-email-clg@kaod.org>

2017-03-10 11:30+0100, Cédric Le Goater:
> 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 <clg@kaod.org>
> ---

Applied, thanks.

>  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
> 

      parent reply	other threads:[~2017-03-15 17:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10 10:30 [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS Cédric Le Goater
2017-03-10 10:45 ` Thomas Huth
2017-03-15 17:11 ` Radim Krčmář [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170315171111.GD14081@potion \
    --to=rkrcmar@redhat.com \
    --cc=clg@kaod.org \
    --cc=drjones@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox