Re: [kvm-unit-tests PATCH] powerpc: add -n to LDFLAGS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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
> 



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux