summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2019-08-05 14:25:16 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-29 08:28:41 +0200
commitdb106f695414144d3cc1de97c7e601eecdb48ae8 (patch)
tree872c0ff9812869da1465d22d813ddef79db6c6db /arch
parent33bdea175df0ffbb2327b6ea90012dd581eb501f (diff)
downloadlinux-stable-db106f695414144d3cc1de97c7e601eecdb48ae8.tar.gz
linux-stable-db106f695414144d3cc1de97c7e601eecdb48ae8.tar.bz2
linux-stable-db106f695414144d3cc1de97c7e601eecdb48ae8.zip
s390: put _stext and _etext into .text section
[ Upstream commit 24350fdadbdec780406a1ef988e6cd3875e374a8 ] Perf relies on _etext and _stext symbols being one of 't', 'T', 'v' or 'V'. Put them into .text section to guarantee that. Also moves padding to page boundary inside .text which has an effect that .text section is now padded with nops rather than 0's, which apparently has been the initial intention for specifying 0x0700 fill expression. Reported-by: Thomas Richter <tmricht@linux.ibm.com> Tested-by: Thomas Richter <tmricht@linux.ibm.com> Suggested-by: Andreas Krebbel <krebbel@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/kernel/vmlinux.lds.S10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index b43f8d33a369..18ede6e806b9 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -31,10 +31,9 @@ PHDRS {
SECTIONS
{
. = 0x100000;
- _stext = .; /* Start of text section */
.text : {
- /* Text and read-only data */
- _text = .;
+ _stext = .; /* Start of text section */
+ _text = .; /* Text and read-only data */
HEAD_TEXT
TEXT_TEXT
SCHED_TEXT
@@ -46,11 +45,10 @@ SECTIONS
*(.text.*_indirect_*)
*(.fixup)
*(.gnu.warning)
+ . = ALIGN(PAGE_SIZE);
+ _etext = .; /* End of text section */
} :text = 0x0700
- . = ALIGN(PAGE_SIZE);
- _etext = .; /* End of text section */
-
NOTES :text :note
.dummy : { *(.dummy) } :data