[PATCH] powerpc: Fix compile error with binutils 2.15

Jon Tollefson kniht at us.ibm.com
Fri Jul 25 11:12:27 EST 2008


Segher Boessenkool wrote:
> My previous patch to fix compilation with binutils-2.17 causes
> a "file truncated" build error from ld with binutils 2.15 (and
> possibly older), and a warning with 2.16 and 2.17.
>
> This fixes it.
>
> Signed-off-by: Segher Boessenkool <segher at kernel.crashing.org>
> ---
>  arch/powerpc/kernel/vmlinux.lds.S |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
> index a914411..4a8ce62 100644
> --- a/arch/powerpc/kernel/vmlinux.lds.S
> +++ b/arch/powerpc/kernel/vmlinux.lds.S
> @@ -85,7 +85,7 @@ SECTIONS
>
>  	/* The dummy segment contents for the bug workaround mentioned above
>  	   near PHDRS.  */
> -	.dummy : {
> +	.dummy : AT(ADDR(.dummy) - LOAD_OFFSET) {
>  		LONG(0xf177)
>  	} :kernel :dummy
>   

This fixed the file truncated error for me.  Also the kernel booted fine.

Jon

~/src/linus/linux-2.6>make vmlinux
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
<stdin>:1397:2: warning: #warning syscall signalfd4 not implemented
<stdin>:1401:2: warning: #warning syscall eventfd2 not implemented
<stdin>:1405:2: warning: #warning syscall epoll_create1 not implemented
<stdin>:1409:2: warning: #warning syscall dup3 not implemented
<stdin>:1413:2: warning: #warning syscall pipe2 not implemented
<stdin>:1417:2: warning: #warning syscall inotify_init1 not implemented
  CHK     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  CALL    arch/powerpc/kernel/systbl_chk.sh
  CALL    arch/powerpc/kernel/prom_init_check.sh
  LDS     arch/powerpc/kernel/vmlinux.lds
  CC      kernel/module.o
  CC      kernel/kexec.o
  LD      kernel/built-in.o
  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: modpost: Found 6 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
  KSYM    .tmp_kallsyms1.S
  AS      .tmp_kallsyms1.o
  LD      .tmp_vmlinux2
  KSYM    .tmp_kallsyms2.S
  AS      .tmp_kallsyms2.o
  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map






More information about the Linuxppc-dev mailing list