diff options
author | 2011-07-23 21:41:19 +0000 | |
---|---|---|
committer | 2011-07-23 21:41:19 +0000 | |
commit | 291d487d139410577c0cb7c4ac05264fa589c569 (patch) | |
tree | 87f8ab7381874d3bf20c3d91f59de2bf35cb4148 | |
parent | Replace the IPv6 header walking loop in pf_test_state_icmp() with (diff) | |
download | wireguard-openbsd-291d487d139410577c0cb7c4ac05264fa589c569.tar.xz wireguard-openbsd-291d487d139410577c0cb7c4ac05264fa589c569.zip |
Properly align the stack early on in the ld.so startup code such that code run
from .init that uses SSE doesn't randomly trigger SIGBUS.
ok drahn@, miod@
-rw-r--r-- | libexec/ld.so/amd64/ldasm.S | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libexec/ld.so/amd64/ldasm.S b/libexec/ld.so/amd64/ldasm.S index 4e9ed24f1c5..0ffe3a600eb 100644 --- a/libexec/ld.so/amd64/ldasm.S +++ b/libexec/ld.so/amd64/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.7 2010/05/11 16:27:14 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.8 2011/07/23 21:41:19 kettenis Exp $ */ /* * Copyright (c) 2002,2004 Dale Rahn @@ -39,6 +39,11 @@ .type _dl_start,@function _dl_start: movq %rsp, %r12 # save stack pointer for _rtld + + subq $8, %rsp # align stack + andq $~15, %rsp + addq $8, %rsp + pushq %rbx # save ps_strings subq $DL_DATA_SIZE, %rsp # allocate dl_data |