From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: linker problem with xip kernel and recent toolchains
Date: Tue, 04 Dec 2012 15:46:51 +0100 [thread overview]
Message-ID: <50BE0CDB.5000704@pengutronix.de> (raw)
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>
next reply other threads:[~2012-12-04 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 14:46 Marc Kleine-Budde [this message]
2012-12-11 13:01 ` linker problem with xip kernel and recent toolchains 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50BE0CDB.5000704@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).