Skip to content

Commit

Permalink
[ARM] 4600/1: fix kernel build failure with build-id-supporting binutils
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lennert Buytenhek authored and Russell King committed Oct 12, 2007
1 parent 033b8ff commit 1e621a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1e621a8

Please sign in to comment.