All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS
@ 2017-03-10 10:30 ` Cédric Le Goater
  0 siblings, 0 replies; 6+ messages in thread
From: Cédric Le Goater @ 2017-03-10 10:30 UTC (permalink / raw)
  To: kvm
  Cc: Thomas Huth, Laurent Vivier, Drew Jones, kvm-ppc, Paolo Bonzini,
	rkrcmar, 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>
---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS
@ 2017-03-10 10:30 ` Cédric Le Goater
  0 siblings, 0 replies; 6+ messages in thread
From: Cédric Le Goater @ 2017-03-10 10:30 UTC (permalink / raw)
  To: kvm
  Cc: Thomas Huth, Laurent Vivier, Drew Jones, kvm-ppc, Paolo Bonzini,
	rkrcmar, 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>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS
  2017-03-10 10:30 ` Cédric Le Goater
@ 2017-03-10 10:45   ` Thomas Huth
  -1 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2017-03-10 10:45 UTC (permalink / raw)
  To: Cédric Le Goater, kvm
  Cc: Laurent Vivier, Drew Jones, kvm-ppc, Paolo Bonzini, rkrcmar

On 10.03.2017 11:30, Cédric Le Goater wrote:
> 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 $@ \

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS
@ 2017-03-10 10:45   ` Thomas Huth
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2017-03-10 10:45 UTC (permalink / raw)
  To: Cédric Le Goater, kvm
  Cc: Laurent Vivier, Drew Jones, kvm-ppc, Paolo Bonzini, rkrcmar

On 10.03.2017 11:30, Cédric Le Goater wrote:
> 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 $@ \

Reviewed-by: Thomas Huth <thuth@redhat.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS
  2017-03-10 10:30 ` Cédric Le Goater
@ 2017-03-15 17:11   ` Radim Krčmář
  -1 siblings, 0 replies; 6+ messages in thread
From: Radim Krčmář @ 2017-03-15 17:11 UTC (permalink / raw)
  To: Cédric Le Goater
  Cc: kvm, Thomas Huth, Laurent Vivier, Drew Jones, kvm-ppc, Paolo Bonzini

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
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS
@ 2017-03-15 17:11   ` Radim Krčmář
  0 siblings, 0 replies; 6+ messages in thread
From: Radim Krčmář @ 2017-03-15 17:11 UTC (permalink / raw)
  To: Cédric Le Goater
  Cc: kvm, Thomas Huth, Laurent Vivier, Drew Jones, kvm-ppc, Paolo Bonzini

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
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-15 17:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10 10:30 [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS Cédric Le Goater
2017-03-10 10:30 ` Cédric Le Goater
2017-03-10 10:45 ` Thomas Huth
2017-03-10 10:45   ` Thomas Huth
2017-03-15 17:11 ` Radim Krčmář
2017-03-15 17:11   ` Radim Krčmář

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.