aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2018-10-29 21:30:13 -0400
committerMax Filippov <jcmvbkbc@gmail.com>2018-10-29 22:02:08 -0400
commit4119ba211bc4f1bf638f41e50b7a0f329f58aa16 (patch)
tree610206a3dc7dea8cfb074e9849b2c257c23eaf9a
parentfe278d1a959283c185ceef0703d8570bf907b95d (diff)
xtensa: add NOTES section to the linker script
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>
-rw-r--r--arch/xtensa/boot/Makefile2
-rw-r--r--arch/xtensa/kernel/vmlinux.lds.S1
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile
index dc9e0ba7122c..294846117fc2 100644
--- a/arch/xtensa/boot/Makefile
+++ b/arch/xtensa/boot/Makefile
@@ -33,7 +33,7 @@ uImage: $(obj)/uImage
33boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y)) 33boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
34 $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS) 34 $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
35 35
36OBJCOPYFLAGS = --strip-all -R .comment -R .note.gnu.build-id -O binary 36OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
37 37
38vmlinux.bin: vmlinux FORCE 38vmlinux.bin: vmlinux FORCE
39 $(call if_changed,objcopy) 39 $(call if_changed,objcopy)
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index a1c3edb8ad56..fa926995d2a3 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -131,6 +131,7 @@ SECTIONS
131 .fixup : { *(.fixup) } 131 .fixup : { *(.fixup) }
132 132
133 EXCEPTION_TABLE(16) 133 EXCEPTION_TABLE(16)
134 NOTES
134 /* Data section */ 135 /* Data section */
135 136
136 _sdata = .; 137 _sdata = .;