mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
x86: Add _CET_ENDBR to functions in crti.S
Add _CET_ENDBR to functions in crti.S, which are called indirectly, to support IBT. Tested on i686 and x86-64. Reviewed-by: Carlos O'Donell <carlos@redhat.com> * sysdeps/i386/crti.S (_init): Add _CET_ENDBR. (_fini): Likewise. * sysdeps/x86_64/crti.S (_init): Likewise. (_fini): Likewise.
This commit is contained in:
parent
9145f0333d
commit
124bcde683
@ -1,3 +1,10 @@
|
||||
2018-07-17 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* sysdeps/i386/crti.S (_init): Add _CET_ENDBR.
|
||||
(_fini): Likewise.
|
||||
* sysdeps/x86_64/crti.S (_init): Likewise.
|
||||
(_fini): Likewise.
|
||||
|
||||
2018-07-17 Rafal Luzynski <digitalfreak@lingonborough.com>
|
||||
|
||||
[BZ #23140]
|
||||
|
@ -61,6 +61,7 @@
|
||||
.hidden _init
|
||||
.type _init, @function
|
||||
_init:
|
||||
_CET_ENDBR
|
||||
pushl %ebx
|
||||
/* Maintain 16-byte stack alignment for called functions. */
|
||||
subl $8, %esp
|
||||
@ -81,6 +82,7 @@ _init:
|
||||
.hidden _fini
|
||||
.type _fini, @function
|
||||
_fini:
|
||||
_CET_ENDBR
|
||||
pushl %ebx
|
||||
subl $8, %esp
|
||||
LOAD_PIC_REG (bx)
|
||||
|
@ -61,6 +61,7 @@
|
||||
.hidden _init
|
||||
.type _init, @function
|
||||
_init:
|
||||
_CET_ENDBR
|
||||
/* Maintain 16-byte stack alignment for called functions. */
|
||||
subq $8, %rsp
|
||||
#if PREINIT_FUNCTION_WEAK
|
||||
@ -79,4 +80,5 @@ _init:
|
||||
.hidden _fini
|
||||
.type _fini, @function
|
||||
_fini:
|
||||
_CET_ENDBR
|
||||
subq $8, %rsp
|
||||
|
Loading…
Reference in New Issue
Block a user