xtensa: add NOTES section to the linker script
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 30 Oct 2018 01:30:13 +0000 (18:30 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Tue, 30 Oct 2018 02:02:08 +0000 (19:02 -0700)
This section collects all source .note.* sections together in the
vmlinux image. Without it .note.Linux section may be placed at address
0, while the rest of the kernel is at its normal address, resulting in a
huge vmlinux.bin image that may not be linked into the xtensa Image.elf.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/boot/Makefile
arch/xtensa/kernel/vmlinux.lds.S

index dc9e0ba7122cad1e982ac33eb5c9d60d9a1db48a..294846117fc2c5527e297ccd50eb55c31c3f3228 100644 (file)
@@ -33,7 +33,7 @@ uImage: $(obj)/uImage
 boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
        $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
 
-OBJCOPYFLAGS = --strip-all -R .comment -R .note.gnu.build-id -O binary
+OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
 
 vmlinux.bin: vmlinux FORCE
        $(call if_changed,objcopy)
index a1c3edb8ad56c0d93e3c9a7d994dc0ffd9ad7351..fa926995d2a37c64ed6075fd9e7598d6c9656fab 100644 (file)
@@ -131,6 +131,7 @@ SECTIONS
   .fixup   : { *(.fixup) }
 
   EXCEPTION_TABLE(16)
+  NOTES
   /* Data section */
 
   _sdata = .;