]> git.baikalelectronics.ru Git - kernel.git/commit
parisc: fix kernel memory layout in vmlinux.ld.S
authorHelge Deller <deller@gmx.de>
Sat, 30 Nov 2013 21:07:51 +0000 (22:07 +0100)
committerHelge Deller <deller@gmx.de>
Sat, 30 Nov 2013 21:09:21 +0000 (22:09 +0100)
commitf7fd10f4576d355e002b0c0c5c797986d681fb11
tree5287e2c53bdc876b7bf2660237dc926efcb50d9c
parentead5f81fda39e297c274e7a109a394c7222c32f0
parisc: fix kernel memory layout in vmlinux.ld.S

When building a 64bit kernel sometimes functions in the .init section were not
able to reach the standard kernel function. Main reason for this problem is,
that the linkage tables (.plt, .opd, .dlt) tend to become pretty huge and thus
the distance gets too big for short calls.

One option to avoid this is to use the -mlong-calls compiler option, but this
increases the binary size and introduces a performance penalty.

Instead, with this patch we just lay out the binary differently.  Init code is
stored first, followed by text, R/O and finally R/W data. This means, that init
and text code is now much closer to each other, which is sufficient to reach
each other by short calls.

Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/head.S
arch/parisc/kernel/vmlinux.lds.S
arch/parisc/mm/init.c