On 03/26/2019 12:55 AM, Michael Ellerman wrote:
Joel Stanley <j...@jms.id.au> writes:
Segher added some workarounds for GCC 4.2 and bintuils 2.18. We now set
4.6 and 2.20 as the minimum, so they can be dropped.

This is mostly a revert of c69cccc95fe4 ("powerpc: Fix build bug with
binutils < 2.18 and GCC < 4.2").

Signed-off-by: Joel Stanley <j...@jms.id.au>
---
  arch/powerpc/kernel/vmlinux.lds.S | 35 ++++---------------------------
  1 file changed, 4 insertions(+), 31 deletions(-)

Seems this breaks some toolchains, at least the one from kernel.org:

   
/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: 
.tmp_vmlinux1: Not enough room for program headers, try linking with -N
   
/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: 
final link failed: Bad value
   make[1]: *** [/kisskb/src/Makefile:1024: vmlinux] Error 1

http://kisskb.ellerman.id.au/kisskb/buildresult/13743374/

Not sure why.

That's binutils 2.30.

cheers


Without the patch on PPC32:

Program Header:
    LOAD off    0x00010000 vaddr 0xc0000000 paddr 0x00000000 align 2**16
         filesz 0x003c2ce4 memsz 0x003e1a08 flags rwx
    NOTE off    0x0038dca8 vaddr 0xc037dca8 paddr 0x0037dca8 align 2**2
         filesz 0x0000003c memsz 0x0000003c flags ---
    NOTE off    0x0038dce4 vaddr 0xc037dce4 paddr 0x0037dce4 align 2**0
         filesz 0x0000000c memsz 0x0000000c flags ---

With the patch:

Program Header:
    LOAD off    0x00010000 vaddr 0xc0000000 paddr 0x00000000 align 2**16
         filesz 0x003c2ce4 memsz 0x003e1a08 flags rwx
    NOTE off    0x0038dca8 vaddr 0xc037dca8 paddr 0x0037dca8 align 2**2
         filesz 0x0000003c memsz 0x0000003c flags r--
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
         filesz 0x00000000 memsz 0x00000000 flags rwx



Christophe

Reply via email to