summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-01-01 19:32:29 +0000
committerkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-01-01 19:32:29 +0000
commit8e9a77d85d13863a7b4bb1f51f5fd0cee02f4a18 (patch)
treeec6593f97e310cc6c91eb0db37e068ad05112f4b
parent9fe061d4a72b5385b469867ba58b9fd40151278c (diff)
fix arm kernel builds with recent binutils versions
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10079 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/generic-2.6/patches-2.6.23/910-arm_binutils_build_id_fix.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.23/910-arm_binutils_build_id_fix.patch b/target/linux/generic-2.6/patches-2.6.23/910-arm_binutils_build_id_fix.patch
new file mode 100644
index 0000000000..e8213bec05
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.23/910-arm_binutils_build_id_fix.patch
@@ -0,0 +1,37 @@
+From: Lennert Buytenhek <buytenh@wantstofly.org>
+Date: Fri, 12 Oct 2007 13:38:54 +0000 (+0100)
+Subject: [ARM] 4600/1: fix kernel build failure with build-id-supporting binutils
+X-Git-Tag: v2.6.24-rc1~1273^2~3
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=1e621a8e3752367d4aae78a8ab00a18fb2793f34;hp=033b8ffe3f1ea8174d51d125838ac6deea60f63f
+
+[ARM] 4600/1: fix kernel build failure with build-id-supporting binutils
+
+Newer versions of binutils support --build-id, which adds an ELF
+note section called ".note.gnu.build-id" to the output. On the ARM
+kernel build, because there is no explicit mention of this section
+in the shipped ld script, this section is placed at vaddr 0x00000000
+(whereas the normal kernel text/data typically starts at vaddr
+0xc0008000), causing the output of objcopy (Image) to produce a 3G+
+file.
+
+This patch makes objcopy strip the .note.gnu.build-id section from
+the Image file along with all other note sections, which fixes the
+build.
+
+Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+---
+
+diff --git a/arch/arm/Makefile b/arch/arm/Makefile
+index fa4ea9f..6c2d539 100644
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
+@@ -12,7 +12,7 @@
+
+ LDFLAGS_vmlinux :=-p --no-undefined -X
+ CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
+-OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
++OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
+ GZFLAGS :=-9
+ #CFLAGS +=-pipe
+ # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: