On Wed, Mar 19, 2008 at 02:21:32PM +0200, Adrian Bunk wrote:
Building m68k kernels with binutils 2.17 works fine, but with binutils 2.18 and 2.18.50.0.5 I'm getting the following link error: <-- snip --> ... m68k-linux-ld -m m68kelf --build-id -o .tmp_vmlinux1 -T arch/m68k/kernel/vmlinux.lds arch/m68k/kernel/head.o init/built-in.o --start-group usr/built-in.o arch/m68k/kernel/built-in.o arch/m68k/mm/built-in.o arch/m68k/amiga/built-in.o arch/m68k/fpsp040/built-in.o arch/m68k/ifpsp060/built-in.o arch/m68k/math-emu/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a arch/m68k/lib/lib.a lib/built-in.o arch/m68k/lib/built-in.o drivers/built-in.o sound/built-in.o net/built-in.o --end-group m68k-linux-ld: .tmp_vmlinux1: Not enough room for program headers, try linking with -N m68k-linux-ld: final link failed: Bad value make[1]: *** [.tmp_vmlinux1] Error 1 <-- snip --> Does anyone have a clue what's going wrong, or even how to fix it?
Which kernel are you using. From bnutils release note, --- Starting from the 2.17.50.0.4 release, the default output section LMA (load memory address) has changed for allocatable sections from being equal to VMA (virtual memory address), to keeping the difference between LMA and VMA the same as the previous output section in the same region. For .data.init_task : { *(.data.init_task) } LMA of .data.init_task section is equal to its VMA with the old linker. With the new linker, it depends on the previous output section. You can use .data.init_task : AT (ADDR(.data.init_task)) { *(.data.init_task) } to ensure that LMA of .data.init_task section is always equal to its VMA. The linker script in the older 2.6 x86-64 kernel depends on the old behavior. You can add AT (ADDR(section)) to force LMA of .data.init_task section equal to its VMA. It will work with both old and new linkers. The x86-64 kernel linker script in kernel 2.6.13 and above is OK. --- Does your kernel link script follow my release note? H.J. -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html