910-arm_binutils_build_id_fix.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From: Lennert Buytenhek <[email protected]>
  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. [ARM] 4600/1: fix kernel build failure with build-id-supporting binutils
  7. Newer versions of binutils support --build-id, which adds an ELF
  8. note section called ".note.gnu.build-id" to the output. On the ARM
  9. kernel build, because there is no explicit mention of this section
  10. in the shipped ld script, this section is placed at vaddr 0x00000000
  11. (whereas the normal kernel text/data typically starts at vaddr
  12. 0xc0008000), causing the output of objcopy (Image) to produce a 3G+
  13. file.
  14. This patch makes objcopy strip the .note.gnu.build-id section from
  15. the Image file along with all other note sections, which fixes the
  16. build.
  17. Signed-off-by: Lennert Buytenhek <[email protected]>
  18. Signed-off-by: Russell King <[email protected]>
  19. ---
  20. --- a/arch/arm/Makefile
  21. +++ b/arch/arm/Makefile
  22. @@ -12,7 +12,7 @@
  23. LDFLAGS_vmlinux :=-p --no-undefined -X
  24. CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
  25. -OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
  26. +OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
  27. GZFLAGS :=-9
  28. #CFLAGS +=-pipe
  29. # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: