From: "Cédric Le Goater" <clg@kaod.org>
To: kvm@vger.kernel.org
Cc: "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>,
rkrcmar@redhat.com, "Cédric Le Goater" <clg@kaod.org>
Subject: [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS
Date: Fri, 10 Mar 2017 11:30:32 +0100 [thread overview]
Message-ID: <1489141832-3754-1-git-send-email-clg@kaod.org> (raw)
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>
---
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
next reply other threads:[~2017-03-10 10:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 10:30 Cédric Le Goater [this message]
2017-03-10 10:45 ` [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS Thomas Huth
2017-03-15 17:11 ` Radim Krčmář
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=1489141832-3754-1-git-send-email-clg@kaod.org \
--to=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=rkrcmar@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