Commit 602bf168 authored by Vasily Gorbik's avatar Vasily Gorbik

s390/nospec: align and size extern thunks

Kernel has full control over how extern thunks generated by
arch/s390/lib/expoline.S look like. Align them to 16 bytes like other
symbols. Also set proper symbols size which is important for tooling.
Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 1d2ad084
......@@ -20,6 +20,7 @@ _LC_BR_R1 = __LC_BR_R1
.macro __THUNK_PROLOG_NAME name
#ifdef CONFIG_EXPOLINE_EXTERN
.pushsection .text,"ax",@progbits
.align 16,0x07
#else
.pushsection .text.\name,"axG",@progbits,\name,comdat
#endif
......@@ -30,8 +31,11 @@ _LC_BR_R1 = __LC_BR_R1
CFI_STARTPROC
.endm
.macro __THUNK_EPILOG
.macro __THUNK_EPILOG_NAME name
CFI_ENDPROC
#ifdef CONFIG_EXPOLINE_EXTERN
.size \name, .-\name
#endif
.popsection
.endm
......@@ -40,6 +44,10 @@ _LC_BR_R1 = __LC_BR_R1
__THUNK_PROLOG_NAME __s390_indirect_jump_r\r1
.endm
.macro __THUNK_EPILOG_BR r1,r2
__THUNK_EPILOG_NAME __s390_indirect_jump_r\r1
.endm
.macro __THUNK_BR r1,r2
jg __s390_indirect_jump_r\r1
.endm
......@@ -52,6 +60,10 @@ _LC_BR_R1 = __LC_BR_R1
__THUNK_PROLOG_NAME __s390_indirect_jump_r\r2\()use_r\r1
.endm
.macro __THUNK_EPILOG_BR r1,r2
__THUNK_EPILOG_NAME __s390_indirect_jump_r\r2\()use_r\r1
.endm
.macro __THUNK_BR r1,r2
jg __s390_indirect_jump_r\r2\()use_r\r1
.endm
......@@ -128,7 +140,7 @@ _LC_BR_R1 = __LC_BR_R1
#endif
__DECODE_RR __THUNK_PROLOG_BR,\reg,\ruse
__THUNK_EX_BR \reg,\ruse
__THUNK_EPILOG
__DECODE_RR __THUNK_EPILOG_BR,\reg,\ruse
.endm
.macro BR_EX reg,ruse=%r1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment