Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2

From: john cooper
Date: Mon Oct 25 2004 - 08:45:03 EST


remi.colinet@xxxxxxx wrote:

Hi,


I'm seeing an odd build error in the -U10.3 patch to 2.6.9-mm1:

<snip>

AS arch/i386/boot/compressed/head.o
CC arch/i386/boot/compressed/misc.o
OBJCOPY arch/i386/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.bss' to huge (ie negative) file offset
0xc03ac000.
objcopy: arch/i386/boot/compressed/vmlinux.bin: File truncated
make[2]: *** [arch/i386/boot/compressed/vmlinux.bin] Error 1
make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2

[root@otaku linux-2.6.9]# objdump -f vmlinux

vmlinux: file format elf32-i386
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00100000

This appears a result of changes in:

arch/i386/kernel/vmlinux.lds.S

apparently for support of CONFIG_KERN_PHYS_OFFSET.
This causes the kernel LMA start address to
change from 0xc0100000 to 0x100000 and objcopy to
gag. I rolled back to a 2.6.9-mm1 version of the
above linker map file and did get the kernel to
build and boot.

Anyone else seeing this? .config attached.


Yes.

You probably need to upgrade your binutil package. The .bss LMA start address
section is not dealt the way it should by ld.

An other (bad) way to work around this compile problem is to force the .bss LMA
start address with the following OBJCOPYFLAGS at objcopy time.

OBJCOPYFLAGS := -O binary --change-section-lma .bss-0xc0000000 -R .note -R
.comment -S

Hope this help,
Remi

Already tried a recent (2.15) version of objcopy
with the same results. But LD was the issue.
BTW the offending version of binutils was 2.13.

Thanks!

--
john.cooper@xxxxxxxxxxx

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/