提交 a6d27212 编写于 作者: R Rich Felker

align stack properly for calling global ctors/dtors on x86[_64]

failure to do so was causing crashes on x86_64 when ctors used SSE,
which was first observed when ctors called variadic functions due to
the SSE prologue code inserted into every variadic function.
上级 44b4d09f
.section .init
.global _init
_init:
sub $12,%esp
.section .fini
.global _fini
_fini:
sub $12,%esp
.section .init
add $12,%esp
ret
.section .fini
add $12,%esp
ret
.section .init
.global _init
_init:
push %rax
.section .fini
.global _fini
_fini:
push %rax
.section .init
pop %rax
ret
.section .fini
pop %rax
ret
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册