Skip to content

Commit

Permalink
xtensa: add NOTES section to the linker script
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Max Filippov committed Oct 30, 2018
1 parent fe278d1 commit 4119ba2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/xtensa/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions arch/xtensa/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ SECTIONS
.fixup : { *(.fixup) }

EXCEPTION_TABLE(16)
NOTES
/* Data section */

_sdata = .;
Expand Down

0 comments on commit 4119ba2

Please sign in to comment.