Keep the stack aligned to a 16 byte boundary when calling init functions
so that we don't cause a bus error if they start storing SSE math stuff on the stack. MFC After: 1 week
This commit is contained in:
parent
a9f9f6ce08
commit
0ff6455012
@ -28,12 +28,14 @@
|
||||
.globl _init
|
||||
.type _init,@function
|
||||
_init:
|
||||
sub $12,%esp /* re-align stack pointer */
|
||||
|
||||
.section .fini,"ax",@progbits
|
||||
.align 4
|
||||
.globl _fini
|
||||
.type _fini,@function
|
||||
_fini:
|
||||
sub $12,%esp /* re-align stack pointer */
|
||||
|
||||
.section .rodata
|
||||
.ascii "$FreeBSD$\0"
|
||||
|
@ -24,9 +24,11 @@
|
||||
*/
|
||||
|
||||
.section .init,"ax",@progbits
|
||||
add $12,%esp
|
||||
ret
|
||||
|
||||
.section .fini,"ax",@progbits
|
||||
add $12,%esp
|
||||
ret
|
||||
|
||||
.section .rodata
|
||||
|
Loading…
x
Reference in New Issue
Block a user