Skip to content

Commit

Permalink
[PARISC] fix boot failure on 32-bit systems caused by branch stubs pl…
Browse files Browse the repository at this point in the history
…aced before .text

In certain configurations, the resulting kernel becomes too large to boot
because the linker places the long branch stubs for the merged .text section
at the very start of the image.  As a result, the initial transfer of control
jumps to an unexpected location.  Fix this by placing the head text in a
separate section so the stubs for .text are not at the start of the image.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
John David Anglin authored and James Bottomley committed May 25, 2012
1 parent 07acfc2 commit ed5fb24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/parisc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ SECTIONS
. = KERNEL_BINARY_TEXT_START;

_text = .; /* Text and read-only data */
.text ALIGN(16) : {
.head ALIGN(16) : {
HEAD_TEXT
} = 0
.text ALIGN(16) : {
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
Expand All @@ -65,7 +67,7 @@ SECTIONS
*(.fixup)
*(.lock.text) /* out-of-line lock text */
*(.gnu.warning)
} = 0
}
/* End of text section */
_etext = .;

Expand Down

0 comments on commit ed5fb24

Please sign in to comment.