Skip to content

Commit

Permalink
ARM: 7605/1: vmlinux.lds: Move .notes section next to the rodata
Browse files Browse the repository at this point in the history
The .notes, being read-only data by nature, were placed between
read-write .data and .bss. This was harmful in case of the XIP
kernel, as being placed in the RAM range, most likely far
from the ROM address, was inflating the XIP images.

Moving the .notes at the end of the read-only section
(consisting of .text, .rodata and unwind info) fixes the problem.

Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Pawel Moll authored and Russell King committed Dec 16, 2012
1 parent b8b499c commit dad5451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ SECTIONS
}
#endif

NOTES

_etext = .; /* End of text and rodata section */

#ifndef CONFIG_XIP_KERNEL
Expand Down Expand Up @@ -295,8 +297,6 @@ SECTIONS
}
#endif

NOTES

BSS_SECTION(0, 0, 0)
_end = .;

Expand Down

0 comments on commit dad5451

Please sign in to comment.