[kernel] netfilter: fix compiler warnings in xt_layer7
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.23 / 910-arm_binutils_build_id_fix.patch
1 From: Lennert Buytenhek <buytenh@wantstofly.org>
2 Date: Fri, 12 Oct 2007 13:38:54 +0000 (+0100)
3 Subject: [ARM] 4600/1: fix kernel build failure with build-id-supporting binutils
4 X-Git-Tag: v2.6.24-rc1~1273^2~3
5 X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=1e621a8e3752367d4aae78a8ab00a18fb2793f34;hp=033b8ffe3f1ea8174d51d125838ac6deea60f63f
6
7 [ARM] 4600/1: fix kernel build failure with build-id-supporting binutils
8
9 Newer versions of binutils support --build-id, which adds an ELF
10 note section called ".note.gnu.build-id" to the output. On the ARM
11 kernel build, because there is no explicit mention of this section
12 in the shipped ld script, this section is placed at vaddr 0x00000000
13 (whereas the normal kernel text/data typically starts at vaddr
14 0xc0008000), causing the output of objcopy (Image) to produce a 3G+
15 file.
16
17 This patch makes objcopy strip the .note.gnu.build-id section from
18 the Image file along with all other note sections, which fixes the
19 build.
20
21 Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
22 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
23 ---
24
25 diff --git a/arch/arm/Makefile b/arch/arm/Makefile
26 index fa4ea9f..6c2d539 100644
27 --- a/arch/arm/Makefile
28 +++ b/arch/arm/Makefile
29 @@ -12,7 +12,7 @@
30
31 LDFLAGS_vmlinux :=-p --no-undefined -X
32 CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
33 -OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
34 +OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
35 GZFLAGS :=-9
36 #CFLAGS +=-pipe
37 # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: