Re: Kernel build error - relocation truncated to fit: R_ARM_PC24 against symbol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Tue, Dec 11, 2007 at 09:51:18PM +0530, Indraneel Mukherjee wrote:
> I'm trying to cross build a kernel with initramfs. I provide the
> rootfs path using CONFIG_INITRAMFS_SOURCE=path/to/my/rootfs.
> 
> The kernel build fails with following error.
> 
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      vmlinux
> init/built-in.o: In function `maxcpus':
> calibrate.c:(.init.text+0x44): relocation truncated to fit: R_ARM_PC24
> against symbol `get_option' defined in .text section in
> lib/lib.a(cmdline.o)
> init/built-in.o: In function `loglevel':
> calibrate.c:(.init.text+0xf4): relocation truncated to fit: R_ARM_PC24
> against symbol `get_option' defined in .text section in
> lib/lib.a(cmdline.o)
> 
> KERNEL - linux-2.6.22-rc5
> BOARD - Apollon
> Toolchain - arm-none-linux-gnueabi-gcc (GCC) 3.4.3 (release)
> (CodeSourcery ARM Q1B 2005)
> SizeOfRootFS - 15 MB
> 
> Do i need to provide some special gcc options? Any help will be highly
> appreciated.

If the above two are the only errors you're seeing, no idea.  If
there's more (why not say so?) it's probably because of the size of
your initramfs.  Since this is placed in the middle of the kernel,
between the init section and the text section, it's limited by the
'branch' size - which can only reach 16MB.

So, you can either make your initramfs smaller, or we _might_ be able
to re-jig the kernel image layout to place the initramfs at the end
of the image.

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter