This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld: section can't be allocated in segment 1
- From: "H.J. Lu" <hjl at lucon dot org>
- To: Clemens Koller <clemens dot koller at anagramm dot de>
- Cc: binutils at sourceware dot org
- Date: Fri, 19 Oct 2007 11:54:55 -0700
- Subject: Re: ld: section can't be allocated in segment 1
- References: <4718D63B.9040500@anagramm.de>
On Fri, Oct 19, 2007 at 06:07:23PM +0200, Clemens Koller wrote:
> Hello!
>
> I just tried to compile a standalone bootloader (u-boot) with the latest
> binutils-2.18
> and gcc-4.2.2 on a
> $ uname -a
> Linux fox 2.6.22-rc6-gb75ae860 #5 Fri Jun 29 19:58:04 CEST 2007 ppc e500
> GNU/Linux
>
> But I run into a problem with the linker script:
>
> $ ld -Bstatic -T
> /share/home/clemens/work/u-boot/u-boot-1.3.0-rc3/board/tqm85xx/u-boot.lds
> -Ttext 0xfffc0000 -n $UNDEF_SYM cpu/mpc85xx/start.o cpu/mpc85xx/resetvec.o
> \
> --start-group lib_generic/libgeneric.a board/tqm85xx/libtqm85xx.a
> cpu/mpc85xx/libmpc85xx.a lib_ppc/libppc.a fs/cramfs/libcramfs.a
> fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a
> fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a
> rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a
> drivers/bios_emulator/libatibiosemu.a drivers/nand/libnand.a
> drivers/nand_legacy/libnand_legacy.a drivers/onenand/libonenand.a
> drivers/net/libnet.a drivers/qe/qe.a drivers/serial/libserial.a
> drivers/sk98lin/libsk98lin.a post/libpost.a post/drivers/libpostdrivers.a
> post/lib_ppc/libpostppc.a post/lib_ppc/fpu/libpostppcfpu.a
> common/libcommon.a libfdt/libfdt.a --end-group -L
> /usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.2 -lgcc \
> -Map u-boot.map -o u-boot
> ld: u-boot: section `.bootpg' can't be allocated in segment 1
> ld: final link failed: Bad value
> make: *** [u-boot] Error 1
>
> What is the meaning of this error message? A "bad value" can be just
> everything.
I suggest you get binutils from CVS. It will provide much more
information when it happens.
H.J.