diff options
author | Christopher Ferris <cferris@google.com> | 2015-04-14 23:43:09 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-14 23:43:09 +0000 |
commit | a529efac4efa4641186fef5003752cc1c43ec763 (patch) | |
tree | 6b4284a31b14fd8ca627f4b3845f860d18be4c85 /libc | |
parent | 8f3f04184a5772b421867b59acd3d0dfbc6fa4eb (diff) | |
parent | 605ee81b0660760dd191f2e2de4c4c92dca5192f (diff) | |
download | bionic-a529efac4efa4641186fef5003752cc1c43ec763.zip bionic-a529efac4efa4641186fef5003752cc1c43ec763.tar.gz bionic-a529efac4efa4641186fef5003752cc1c43ec763.tar.bz2 |
Merge "Add missing cfi directives for x86 assembler."
Diffstat (limited to 'libc')
-rw-r--r-- | libc/arch-x86/bionic/__bionic_clone.S | 12 | ||||
-rw-r--r-- | libc/arch-x86/bionic/syscall.S | 16 | ||||
-rw-r--r-- | libc/arch-x86/bionic/vfork.S | 2 |
3 files changed, 30 insertions, 0 deletions
diff --git a/libc/arch-x86/bionic/__bionic_clone.S b/libc/arch-x86/bionic/__bionic_clone.S index ef78aee..1a6f642 100644 --- a/libc/arch-x86/bionic/__bionic_clone.S +++ b/libc/arch-x86/bionic/__bionic_clone.S @@ -3,8 +3,14 @@ // pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg); ENTRY(__bionic_clone) pushl %ebx + .cfi_adjust_cfa_offset 4 + .cfi_rel_offset ebx, 0 pushl %esi + .cfi_adjust_cfa_offset 4 + .cfi_rel_offset esi, 0 pushl %edi + .cfi_adjust_cfa_offset 4 + .cfi_rel_offset edi, 0 # Load system call arguments into registers. movl 16(%esp), %ebx # flags @@ -46,8 +52,14 @@ ENTRY(__bionic_clone) # We're the parent; nothing to do. .L_bc_return: popl %edi + .cfi_adjust_cfa_offset -4 + .cfi_restore edi popl %esi + .cfi_adjust_cfa_offset -4 + .cfi_restore esi popl %ebx + .cfi_adjust_cfa_offset -4 + .cfi_restore ebx ret END(__bionic_clone) .hidden __bionic_clone diff --git a/libc/arch-x86/bionic/syscall.S b/libc/arch-x86/bionic/syscall.S index f85ec39..963e4c5 100644 --- a/libc/arch-x86/bionic/syscall.S +++ b/libc/arch-x86/bionic/syscall.S @@ -15,9 +15,17 @@ ENTRY(syscall) # Push the callee save registers. push %ebx + .cfi_adjust_cfa_offset 4 + .cfi_rel_offset ebx, 0 push %esi + .cfi_adjust_cfa_offset 4 + .cfi_rel_offset esi, 0 push %edi + .cfi_adjust_cfa_offset 4 + .cfi_rel_offset edi, 0 push %ebp + .cfi_adjust_cfa_offset 4 + .cfi_rel_offset ebp, 0 # Load all the arguments from the calling frame. # (Not all will be valid, depending on the syscall.) @@ -43,8 +51,16 @@ ENTRY(syscall) 1: # Restore the callee save registers. pop %ebp + .cfi_adjust_cfa_offset -4 + .cfi_restore ebp, 0 pop %edi + .cfi_adjust_cfa_offset -4 + .cfi_restore edi, 0 pop %esi + .cfi_adjust_cfa_offset -4 + .cfi_restore esi, 0 pop %ebx + .cfi_adjust_cfa_offset -4 + .cfi_restore ebx, 0 ret END(syscall) diff --git a/libc/arch-x86/bionic/vfork.S b/libc/arch-x86/bionic/vfork.S index 6c02910..ca7af0f 100644 --- a/libc/arch-x86/bionic/vfork.S +++ b/libc/arch-x86/bionic/vfork.S @@ -32,6 +32,8 @@ ENTRY(vfork) popl %ecx // Grab the return address. + .cfi_adjust_cfa_offset 4 + .cfi_rel_offset ecx, 0 movl $__NR_vfork, %eax int $0x80 cmpl $-MAX_ERRNO, %eax |