Kaynağa Gözat

Fix some compact unwind errors.

The Mac ld gets unhappy about "weird" unwind directives:

In chacha20_poly1305_x86_64.pl, $keyp is being pushed on the stack
(according to the comment) because it gets clobbered in the computation
somewhere. $keyp is %r9 which is not callee-saved (it's an argument
register), so we don't need to tag it with .cfi_offset.

In x25519-asm-x86_64.S, x25519_x86_64_mul saves %rdi on the stack.
However it too is not callee-saved (it's an argument register) and
should not have a .cfi_offset. %rdi also does not appear to be written
to anywhere in the function, so there's no need to save it at all.

(This does not resolve the "r15 is saved too far from return address"
errors. Just the non-standard register ones.)

BUG=176

Change-Id: I53f3f7db3d1745384fb47cb52cd6536aabb5065e
Reviewed-on: https://boringssl-review.googlesource.com/13560
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 7 yıl önce
committed by Adam Langley
ebeveyn
işleme
5c9d411e14
2 değiştirilmiş dosya ile 0 ekleme ve 4 silme
  1. +0
    -2
      crypto/cipher/asm/chacha20_poly1305_x86_64.pl
  2. +0
    -2
      crypto/curve25519/asm/x25519-asm-x86_64.S

+ 0
- 2
crypto/cipher/asm/chacha20_poly1305_x86_64.pl Dosyayı Görüntüle

@@ -453,7 +453,6 @@ chacha20_poly1305_open:
.cfi_offset r13, -40
.cfi_offset r14, -48
.cfi_offset r15, -56
.cfi_offset $keyp, -64
lea 32(%rsp), %rbp
and \$-32, %rbp
mov %rdx, 8+$len_store
@@ -852,7 +851,6 @@ chacha20_poly1305_seal:
.cfi_offset r13, -40
.cfi_offset r14, -48
.cfi_offset r15, -56
.cfi_offset $keyp, -64
lea 32(%rsp), %rbp
and \$-32, %rbp
mov %rdx, 8+$len_store


+ 0
- 2
crypto/curve25519/asm/x25519-asm-x86_64.S Dosyayı Görüntüle

@@ -143,8 +143,6 @@ movq %rbx,-40(%rsp)
.cfi_rel_offset rbx, -40
movq %rbp,-48(%rsp)
.cfi_rel_offset rbp, -48
movq %rdi,-56(%rsp)
.cfi_rel_offset rdi, -56
mov %rdx,%rcx
movq 24(%rsi),%rdx
imulq $19,%rdx,%rax


Yükleniyor…
İptal
Kaydet