linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* linker problem with xip kernel and recent toolchains
@ 2012-12-04 14:46 Marc Kleine-Budde
  2012-12-11 13:01 ` Pawel Moll
  0 siblings, 1 reply; 9+ messages in thread
From: Marc Kleine-Budde @ 2012-12-04 14:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

we've just discovered a linker problem with newer toolchains, that
support --build-id and xip kernels. The resulting vmlinux is about 13
MiB big, but the xipimage ~2GiB.

A look at the vmlinux's objdump shows that the .notes section is around
2 GiB and it's placed by the linker script into the RAM. With the ROM
starting at 0x0 this results into a ~2 GiB big image.

>   [16] .data             PROGBITS        88008000 0a0000 012aa0 00  WA  0   0 256
>   [17] .notes            NOTE            8801aaa0 0b2aa0 000024 00  AX  0   0  4
>   [18] .bss              NOBITS          8801aae0 0b2ac4 005414 00  WA  0   0 32

After discarding the .notes section in the objcopy (see patch below) the
resulting binary images has a proper size again.

Marc

index 1ec5f67..4448790 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -18,7 +18,7 @@ ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
 LDFLAGS_vmlinux        += --be8
 endif

-OBJCOPYFLAGS   :=-O binary -R .comment -S
+OBJCOPYFLAGS   :=-O binary -R .comment -R .notes -S
 GZFLAGS                :=-9
 #KBUILD_CFLAGS +=-pipe

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121204/78670e47/attachment.sig>

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-12-13 13:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-04 14:46 linker problem with xip kernel and recent toolchains Marc Kleine-Budde
2012-12-11 13:01 ` Pawel Moll
2012-12-11 13:43   ` Marc Kleine-Budde
2012-12-11 13:52     ` Pawel Moll
2012-12-11 18:11     ` Pawel Moll
2012-12-12  8:22       ` Marc Kleine-Budde
2012-12-12  8:44         ` Baruch Siach
2012-12-12  8:49           ` Marc Kleine-Budde
2012-12-13 13:20         ` Pawel Moll

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).