From e4bc7561219ddb7cfb7b33f731caa92a7766b9ca Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Mon, 6 Jan 2014 16:39:10 -0800 Subject: [PATCH] Add cfi directives to x86 syscalls. Modify the syscalls script to generate the cfi directives for x86 syscalls. Update the x86 syscalls. Change-Id: Ia1993dc714a7e79f917087fff8200e9a02c52603 --- libc/arch-x86/syscalls/__brk.S | 2 + libc/arch-x86/syscalls/__epoll_pwait.S | 7 +++ libc/arch-x86/syscalls/__exit.S | 2 + libc/arch-x86/syscalls/__fcntl64.S | 4 ++ libc/arch-x86/syscalls/__fstatfs64.S | 4 ++ libc/arch-x86/syscalls/__getcpu.S | 4 ++ libc/arch-x86/syscalls/__getcwd.S | 3 ++ libc/arch-x86/syscalls/__getpriority.S | 3 ++ libc/arch-x86/syscalls/__ioctl.S | 4 ++ libc/arch-x86/syscalls/__llseek.S | 6 +++ libc/arch-x86/syscalls/__mmap2.S | 7 +++ libc/arch-x86/syscalls/__openat.S | 5 +++ libc/arch-x86/syscalls/__ppoll.S | 6 +++ libc/arch-x86/syscalls/__pselect6.S | 7 +++ libc/arch-x86/syscalls/__ptrace.S | 5 +++ libc/arch-x86/syscalls/__reboot.S | 5 +++ libc/arch-x86/syscalls/__rt_sigaction.S | 5 +++ libc/arch-x86/syscalls/__rt_sigpending.S | 3 ++ libc/arch-x86/syscalls/__rt_sigprocmask.S | 5 +++ libc/arch-x86/syscalls/__rt_sigsuspend.S | 3 ++ libc/arch-x86/syscalls/__rt_sigtimedwait.S | 5 +++ libc/arch-x86/syscalls/__sched_getaffinity.S | 4 ++ libc/arch-x86/syscalls/__set_thread_area.S | 2 + libc/arch-x86/syscalls/__set_tid_address.S | 2 + libc/arch-x86/syscalls/__sigaction.S | 4 ++ libc/arch-x86/syscalls/__statfs64.S | 4 ++ libc/arch-x86/syscalls/__syslog.S | 4 ++ libc/arch-x86/syscalls/__timer_create.S | 4 ++ libc/arch-x86/syscalls/__timer_delete.S | 2 + libc/arch-x86/syscalls/__timer_getoverrun.S | 2 + libc/arch-x86/syscalls/__timer_gettime.S | 3 ++ libc/arch-x86/syscalls/__timer_settime.S | 5 +++ libc/arch-x86/syscalls/__waitid.S | 6 +++ libc/arch-x86/syscalls/_exit.S | 2 + libc/arch-x86/syscalls/accept.S | 3 ++ libc/arch-x86/syscalls/acct.S | 2 + libc/arch-x86/syscalls/bind.S | 3 ++ libc/arch-x86/syscalls/capget.S | 3 ++ libc/arch-x86/syscalls/capset.S | 3 ++ libc/arch-x86/syscalls/chdir.S | 2 + libc/arch-x86/syscalls/chroot.S | 2 + libc/arch-x86/syscalls/clock_getres.S | 3 ++ libc/arch-x86/syscalls/clock_gettime.S | 3 ++ libc/arch-x86/syscalls/clock_nanosleep.S | 5 +++ libc/arch-x86/syscalls/clock_settime.S | 3 ++ libc/arch-x86/syscalls/close.S | 2 + libc/arch-x86/syscalls/connect.S | 3 ++ libc/arch-x86/syscalls/delete_module.S | 3 ++ libc/arch-x86/syscalls/dup.S | 2 + libc/arch-x86/syscalls/dup3.S | 4 ++ libc/arch-x86/syscalls/epoll_create1.S | 2 + libc/arch-x86/syscalls/epoll_ctl.S | 5 +++ libc/arch-x86/syscalls/eventfd.S | 3 ++ libc/arch-x86/syscalls/execve.S | 4 ++ libc/arch-x86/syscalls/faccessat.S | 5 +++ libc/arch-x86/syscalls/fchdir.S | 2 + libc/arch-x86/syscalls/fchmod.S | 3 ++ libc/arch-x86/syscalls/fchmodat.S | 5 +++ libc/arch-x86/syscalls/fchown.S | 4 ++ libc/arch-x86/syscalls/fchownat.S | 6 +++ libc/arch-x86/syscalls/fdatasync.S | 2 + libc/arch-x86/syscalls/fgetxattr.S | 5 +++ libc/arch-x86/syscalls/flistxattr.S | 4 ++ libc/arch-x86/syscalls/flock.S | 3 ++ libc/arch-x86/syscalls/fremovexattr.S | 3 ++ libc/arch-x86/syscalls/fsetxattr.S | 6 +++ libc/arch-x86/syscalls/fstat.S | 3 ++ libc/arch-x86/syscalls/fstatat.S | 5 +++ libc/arch-x86/syscalls/fsync.S | 2 + libc/arch-x86/syscalls/ftruncate.S | 3 ++ libc/arch-x86/syscalls/ftruncate64.S | 4 ++ libc/arch-x86/syscalls/futex.S | 7 +++ libc/arch-x86/syscalls/getdents.S | 4 ++ libc/arch-x86/syscalls/getgroups.S | 3 ++ libc/arch-x86/syscalls/getitimer.S | 3 ++ libc/arch-x86/syscalls/getpeername.S | 3 ++ libc/arch-x86/syscalls/getpgid.S | 2 + libc/arch-x86/syscalls/getresgid.S | 4 ++ libc/arch-x86/syscalls/getresuid.S | 4 ++ libc/arch-x86/syscalls/getrlimit.S | 3 ++ libc/arch-x86/syscalls/getrusage.S | 3 ++ libc/arch-x86/syscalls/getsid.S | 2 + libc/arch-x86/syscalls/getsockname.S | 3 ++ libc/arch-x86/syscalls/getsockopt.S | 3 ++ libc/arch-x86/syscalls/gettimeofday.S | 3 ++ libc/arch-x86/syscalls/getxattr.S | 5 +++ libc/arch-x86/syscalls/init_module.S | 4 ++ libc/arch-x86/syscalls/inotify_add_watch.S | 4 ++ libc/arch-x86/syscalls/inotify_init1.S | 2 + libc/arch-x86/syscalls/inotify_rm_watch.S | 3 ++ libc/arch-x86/syscalls/ioprio_get.S | 3 ++ libc/arch-x86/syscalls/ioprio_set.S | 4 ++ libc/arch-x86/syscalls/kill.S | 3 ++ libc/arch-x86/syscalls/klogctl.S | 4 ++ libc/arch-x86/syscalls/lgetxattr.S | 5 +++ libc/arch-x86/syscalls/linkat.S | 6 +++ libc/arch-x86/syscalls/listen.S | 3 ++ libc/arch-x86/syscalls/listxattr.S | 4 ++ libc/arch-x86/syscalls/llistxattr.S | 4 ++ libc/arch-x86/syscalls/lremovexattr.S | 3 ++ libc/arch-x86/syscalls/lseek.S | 4 ++ libc/arch-x86/syscalls/lsetxattr.S | 6 +++ libc/arch-x86/syscalls/madvise.S | 4 ++ libc/arch-x86/syscalls/mincore.S | 4 ++ libc/arch-x86/syscalls/mkdirat.S | 4 ++ libc/arch-x86/syscalls/mknodat.S | 5 +++ libc/arch-x86/syscalls/mlock.S | 3 ++ libc/arch-x86/syscalls/mlockall.S | 2 + libc/arch-x86/syscalls/mount.S | 6 +++ libc/arch-x86/syscalls/mprotect.S | 4 ++ libc/arch-x86/syscalls/mremap.S | 5 +++ libc/arch-x86/syscalls/msync.S | 4 ++ libc/arch-x86/syscalls/munlock.S | 3 ++ libc/arch-x86/syscalls/munmap.S | 3 ++ libc/arch-x86/syscalls/nanosleep.S | 3 ++ libc/arch-x86/syscalls/perf_event_open.S | 6 +++ libc/arch-x86/syscalls/personality.S | 2 + libc/arch-x86/syscalls/pipe2.S | 3 ++ libc/arch-x86/syscalls/prctl.S | 6 +++ libc/arch-x86/syscalls/pread64.S | 6 +++ libc/arch-x86/syscalls/pwrite64.S | 6 +++ libc/arch-x86/syscalls/read.S | 4 ++ libc/arch-x86/syscalls/readahead.S | 5 +++ libc/arch-x86/syscalls/readlinkat.S | 5 +++ libc/arch-x86/syscalls/readv.S | 4 ++ libc/arch-x86/syscalls/recvfrom.S | 3 ++ libc/arch-x86/syscalls/recvmsg.S | 3 ++ libc/arch-x86/syscalls/removexattr.S | 3 ++ libc/arch-x86/syscalls/renameat.S | 5 +++ .../syscalls/sched_get_priority_max.S | 2 + .../syscalls/sched_get_priority_min.S | 2 + libc/arch-x86/syscalls/sched_getparam.S | 3 ++ libc/arch-x86/syscalls/sched_getscheduler.S | 2 + .../arch-x86/syscalls/sched_rr_get_interval.S | 3 ++ libc/arch-x86/syscalls/sched_setaffinity.S | 4 ++ libc/arch-x86/syscalls/sched_setparam.S | 3 ++ libc/arch-x86/syscalls/sched_setscheduler.S | 4 ++ libc/arch-x86/syscalls/sched_yield.S | 2 + libc/arch-x86/syscalls/sendfile.S | 5 +++ libc/arch-x86/syscalls/sendfile64.S | 5 +++ libc/arch-x86/syscalls/sendmsg.S | 3 ++ libc/arch-x86/syscalls/sendto.S | 3 ++ libc/arch-x86/syscalls/setgid.S | 2 + libc/arch-x86/syscalls/setgroups.S | 3 ++ libc/arch-x86/syscalls/setitimer.S | 4 ++ libc/arch-x86/syscalls/setns.S | 3 ++ libc/arch-x86/syscalls/setpgid.S | 3 ++ libc/arch-x86/syscalls/setpriority.S | 4 ++ libc/arch-x86/syscalls/setregid.S | 3 ++ libc/arch-x86/syscalls/setresgid.S | 4 ++ libc/arch-x86/syscalls/setresuid.S | 4 ++ libc/arch-x86/syscalls/setreuid.S | 3 ++ libc/arch-x86/syscalls/setrlimit.S | 3 ++ libc/arch-x86/syscalls/setsockopt.S | 3 ++ libc/arch-x86/syscalls/settimeofday.S | 3 ++ libc/arch-x86/syscalls/setuid.S | 2 + libc/arch-x86/syscalls/setxattr.S | 6 +++ libc/arch-x86/syscalls/shutdown.S | 3 ++ libc/arch-x86/syscalls/sigaltstack.S | 3 ++ libc/arch-x86/syscalls/signalfd4.S | 5 +++ libc/arch-x86/syscalls/socket.S | 3 ++ libc/arch-x86/syscalls/socketpair.S | 3 ++ libc/arch-x86/syscalls/swapoff.S | 2 + libc/arch-x86/syscalls/swapon.S | 3 ++ libc/arch-x86/syscalls/symlinkat.S | 4 ++ libc/arch-x86/syscalls/sync.S | 2 + libc/arch-x86/syscalls/sysinfo.S | 2 + libc/arch-x86/syscalls/tgkill.S | 4 ++ libc/arch-x86/syscalls/timerfd_create.S | 3 ++ libc/arch-x86/syscalls/timerfd_gettime.S | 3 ++ libc/arch-x86/syscalls/timerfd_settime.S | 5 +++ libc/arch-x86/syscalls/times.S | 2 + libc/arch-x86/syscalls/tkill.S | 3 ++ libc/arch-x86/syscalls/truncate.S | 3 ++ libc/arch-x86/syscalls/truncate64.S | 4 ++ libc/arch-x86/syscalls/umask.S | 2 + libc/arch-x86/syscalls/umount2.S | 3 ++ libc/arch-x86/syscalls/uname.S | 2 + libc/arch-x86/syscalls/unlinkat.S | 4 ++ libc/arch-x86/syscalls/unshare.S | 2 + libc/arch-x86/syscalls/utimensat.S | 5 +++ libc/arch-x86/syscalls/wait4.S | 5 +++ libc/arch-x86/syscalls/write.S | 4 ++ libc/arch-x86/syscalls/writev.S | 4 ++ libc/tools/gensyscalls.py | 45 +++++++++++-------- 185 files changed, 694 insertions(+), 19 deletions(-) diff --git a/libc/arch-x86/syscalls/__brk.S b/libc/arch-x86/syscalls/__brk.S index ebde7ba4d..728bf8115 100644 --- a/libc/arch-x86/syscalls/__brk.S +++ b/libc/arch-x86/syscalls/__brk.S @@ -4,6 +4,8 @@ ENTRY(__brk) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_brk, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/__epoll_pwait.S b/libc/arch-x86/syscalls/__epoll_pwait.S index 2d424c693..9bcc1421b 100644 --- a/libc/arch-x86/syscalls/__epoll_pwait.S +++ b/libc/arch-x86/syscalls/__epoll_pwait.S @@ -9,6 +9,13 @@ ENTRY(__epoll_pwait) pushl %esi pushl %edi pushl %ebp + .cfi_def_cfa_offset 24 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 + .cfi_rel_offset ebp, 20 mov 28(%esp), %ebx mov 32(%esp), %ecx mov 36(%esp), %edx diff --git a/libc/arch-x86/syscalls/__exit.S b/libc/arch-x86/syscalls/__exit.S index 83f04a543..eaddc5e7b 100644 --- a/libc/arch-x86/syscalls/__exit.S +++ b/libc/arch-x86/syscalls/__exit.S @@ -4,6 +4,8 @@ ENTRY(__exit) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_exit, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/__fcntl64.S b/libc/arch-x86/syscalls/__fcntl64.S index dda2b1777..faefa65d7 100644 --- a/libc/arch-x86/syscalls/__fcntl64.S +++ b/libc/arch-x86/syscalls/__fcntl64.S @@ -6,6 +6,10 @@ ENTRY(__fcntl64) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/__fstatfs64.S b/libc/arch-x86/syscalls/__fstatfs64.S index 1f0cc8067..dfd04af3d 100644 --- a/libc/arch-x86/syscalls/__fstatfs64.S +++ b/libc/arch-x86/syscalls/__fstatfs64.S @@ -6,6 +6,10 @@ ENTRY(__fstatfs64) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/__getcpu.S b/libc/arch-x86/syscalls/__getcpu.S index cef5f1889..d1da87146 100644 --- a/libc/arch-x86/syscalls/__getcpu.S +++ b/libc/arch-x86/syscalls/__getcpu.S @@ -6,6 +6,10 @@ ENTRY(__getcpu) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/__getcwd.S b/libc/arch-x86/syscalls/__getcwd.S index 5a0dae2a8..a9834e256 100644 --- a/libc/arch-x86/syscalls/__getcwd.S +++ b/libc/arch-x86/syscalls/__getcwd.S @@ -5,6 +5,9 @@ ENTRY(__getcwd) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_getcwd, %eax diff --git a/libc/arch-x86/syscalls/__getpriority.S b/libc/arch-x86/syscalls/__getpriority.S index 72fd8a539..99d33bbcb 100644 --- a/libc/arch-x86/syscalls/__getpriority.S +++ b/libc/arch-x86/syscalls/__getpriority.S @@ -5,6 +5,9 @@ ENTRY(__getpriority) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_getpriority, %eax diff --git a/libc/arch-x86/syscalls/__ioctl.S b/libc/arch-x86/syscalls/__ioctl.S index 6caf918e1..ad617f0bd 100644 --- a/libc/arch-x86/syscalls/__ioctl.S +++ b/libc/arch-x86/syscalls/__ioctl.S @@ -6,6 +6,10 @@ ENTRY(__ioctl) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/__llseek.S b/libc/arch-x86/syscalls/__llseek.S index a24b0216a..2dab8a9f1 100644 --- a/libc/arch-x86/syscalls/__llseek.S +++ b/libc/arch-x86/syscalls/__llseek.S @@ -8,6 +8,12 @@ ENTRY(__llseek) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/__mmap2.S b/libc/arch-x86/syscalls/__mmap2.S index 6308c9b9d..963abf311 100644 --- a/libc/arch-x86/syscalls/__mmap2.S +++ b/libc/arch-x86/syscalls/__mmap2.S @@ -9,6 +9,13 @@ ENTRY(__mmap2) pushl %esi pushl %edi pushl %ebp + .cfi_def_cfa_offset 24 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 + .cfi_rel_offset ebp, 20 mov 28(%esp), %ebx mov 32(%esp), %ecx mov 36(%esp), %edx diff --git a/libc/arch-x86/syscalls/__openat.S b/libc/arch-x86/syscalls/__openat.S index 7bb833cf1..6b05bec27 100644 --- a/libc/arch-x86/syscalls/__openat.S +++ b/libc/arch-x86/syscalls/__openat.S @@ -7,6 +7,11 @@ ENTRY(__openat) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/__ppoll.S b/libc/arch-x86/syscalls/__ppoll.S index 553fad127..e5af93c0e 100644 --- a/libc/arch-x86/syscalls/__ppoll.S +++ b/libc/arch-x86/syscalls/__ppoll.S @@ -8,6 +8,12 @@ ENTRY(__ppoll) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/__pselect6.S b/libc/arch-x86/syscalls/__pselect6.S index a464c9a4d..984a67e1a 100644 --- a/libc/arch-x86/syscalls/__pselect6.S +++ b/libc/arch-x86/syscalls/__pselect6.S @@ -9,6 +9,13 @@ ENTRY(__pselect6) pushl %esi pushl %edi pushl %ebp + .cfi_def_cfa_offset 24 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 + .cfi_rel_offset ebp, 20 mov 28(%esp), %ebx mov 32(%esp), %ecx mov 36(%esp), %edx diff --git a/libc/arch-x86/syscalls/__ptrace.S b/libc/arch-x86/syscalls/__ptrace.S index 7dc46d9f4..d3b803163 100644 --- a/libc/arch-x86/syscalls/__ptrace.S +++ b/libc/arch-x86/syscalls/__ptrace.S @@ -7,6 +7,11 @@ ENTRY(__ptrace) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/__reboot.S b/libc/arch-x86/syscalls/__reboot.S index bde2c6078..b64490677 100644 --- a/libc/arch-x86/syscalls/__reboot.S +++ b/libc/arch-x86/syscalls/__reboot.S @@ -7,6 +7,11 @@ ENTRY(__reboot) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/__rt_sigaction.S b/libc/arch-x86/syscalls/__rt_sigaction.S index 47c33be9c..1c5fdccbf 100644 --- a/libc/arch-x86/syscalls/__rt_sigaction.S +++ b/libc/arch-x86/syscalls/__rt_sigaction.S @@ -7,6 +7,11 @@ ENTRY(__rt_sigaction) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/__rt_sigpending.S b/libc/arch-x86/syscalls/__rt_sigpending.S index e4a098155..552219516 100644 --- a/libc/arch-x86/syscalls/__rt_sigpending.S +++ b/libc/arch-x86/syscalls/__rt_sigpending.S @@ -5,6 +5,9 @@ ENTRY(__rt_sigpending) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_rt_sigpending, %eax diff --git a/libc/arch-x86/syscalls/__rt_sigprocmask.S b/libc/arch-x86/syscalls/__rt_sigprocmask.S index 0fa110656..0df7301b2 100644 --- a/libc/arch-x86/syscalls/__rt_sigprocmask.S +++ b/libc/arch-x86/syscalls/__rt_sigprocmask.S @@ -7,6 +7,11 @@ ENTRY(__rt_sigprocmask) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/__rt_sigsuspend.S b/libc/arch-x86/syscalls/__rt_sigsuspend.S index aa4eae6a3..0e7dbdf04 100644 --- a/libc/arch-x86/syscalls/__rt_sigsuspend.S +++ b/libc/arch-x86/syscalls/__rt_sigsuspend.S @@ -5,6 +5,9 @@ ENTRY(__rt_sigsuspend) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_rt_sigsuspend, %eax diff --git a/libc/arch-x86/syscalls/__rt_sigtimedwait.S b/libc/arch-x86/syscalls/__rt_sigtimedwait.S index a97ef77b6..cfbc7a64e 100644 --- a/libc/arch-x86/syscalls/__rt_sigtimedwait.S +++ b/libc/arch-x86/syscalls/__rt_sigtimedwait.S @@ -7,6 +7,11 @@ ENTRY(__rt_sigtimedwait) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/__sched_getaffinity.S b/libc/arch-x86/syscalls/__sched_getaffinity.S index c9de99761..a9b9f790a 100644 --- a/libc/arch-x86/syscalls/__sched_getaffinity.S +++ b/libc/arch-x86/syscalls/__sched_getaffinity.S @@ -6,6 +6,10 @@ ENTRY(__sched_getaffinity) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/__set_thread_area.S b/libc/arch-x86/syscalls/__set_thread_area.S index 0dc0e335d..ce0623369 100644 --- a/libc/arch-x86/syscalls/__set_thread_area.S +++ b/libc/arch-x86/syscalls/__set_thread_area.S @@ -4,6 +4,8 @@ ENTRY(__set_thread_area) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_set_thread_area, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/__set_tid_address.S b/libc/arch-x86/syscalls/__set_tid_address.S index 0c66d4707..6a3943d10 100644 --- a/libc/arch-x86/syscalls/__set_tid_address.S +++ b/libc/arch-x86/syscalls/__set_tid_address.S @@ -4,6 +4,8 @@ ENTRY(__set_tid_address) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_set_tid_address, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/__sigaction.S b/libc/arch-x86/syscalls/__sigaction.S index 45274df8b..8824a85d8 100644 --- a/libc/arch-x86/syscalls/__sigaction.S +++ b/libc/arch-x86/syscalls/__sigaction.S @@ -6,6 +6,10 @@ ENTRY(__sigaction) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/__statfs64.S b/libc/arch-x86/syscalls/__statfs64.S index 1db5f69b5..7a91f1d4e 100644 --- a/libc/arch-x86/syscalls/__statfs64.S +++ b/libc/arch-x86/syscalls/__statfs64.S @@ -6,6 +6,10 @@ ENTRY(__statfs64) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/__syslog.S b/libc/arch-x86/syscalls/__syslog.S index dec69e8a8..1da01be1b 100644 --- a/libc/arch-x86/syscalls/__syslog.S +++ b/libc/arch-x86/syscalls/__syslog.S @@ -6,6 +6,10 @@ ENTRY(__syslog) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/__timer_create.S b/libc/arch-x86/syscalls/__timer_create.S index 6a30721e4..68480d1c2 100644 --- a/libc/arch-x86/syscalls/__timer_create.S +++ b/libc/arch-x86/syscalls/__timer_create.S @@ -6,6 +6,10 @@ ENTRY(__timer_create) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/__timer_delete.S b/libc/arch-x86/syscalls/__timer_delete.S index 5119cae77..a2732e120 100644 --- a/libc/arch-x86/syscalls/__timer_delete.S +++ b/libc/arch-x86/syscalls/__timer_delete.S @@ -4,6 +4,8 @@ ENTRY(__timer_delete) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_timer_delete, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/__timer_getoverrun.S b/libc/arch-x86/syscalls/__timer_getoverrun.S index fbe7e427f..a340bfe44 100644 --- a/libc/arch-x86/syscalls/__timer_getoverrun.S +++ b/libc/arch-x86/syscalls/__timer_getoverrun.S @@ -4,6 +4,8 @@ ENTRY(__timer_getoverrun) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_timer_getoverrun, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/__timer_gettime.S b/libc/arch-x86/syscalls/__timer_gettime.S index ec4a5e9d8..4aeb8eb5e 100644 --- a/libc/arch-x86/syscalls/__timer_gettime.S +++ b/libc/arch-x86/syscalls/__timer_gettime.S @@ -5,6 +5,9 @@ ENTRY(__timer_gettime) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_timer_gettime, %eax diff --git a/libc/arch-x86/syscalls/__timer_settime.S b/libc/arch-x86/syscalls/__timer_settime.S index abd2754ca..f93bca4af 100644 --- a/libc/arch-x86/syscalls/__timer_settime.S +++ b/libc/arch-x86/syscalls/__timer_settime.S @@ -7,6 +7,11 @@ ENTRY(__timer_settime) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/__waitid.S b/libc/arch-x86/syscalls/__waitid.S index c22a9c5e2..cda523875 100644 --- a/libc/arch-x86/syscalls/__waitid.S +++ b/libc/arch-x86/syscalls/__waitid.S @@ -8,6 +8,12 @@ ENTRY(__waitid) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/_exit.S b/libc/arch-x86/syscalls/_exit.S index 04dc16b21..2ff5faf13 100644 --- a/libc/arch-x86/syscalls/_exit.S +++ b/libc/arch-x86/syscalls/_exit.S @@ -4,6 +4,8 @@ ENTRY(_exit) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_exit_group, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/accept.S b/libc/arch-x86/syscalls/accept.S index f2912c815..f7e8a58eb 100644 --- a/libc/arch-x86/syscalls/accept.S +++ b/libc/arch-x86/syscalls/accept.S @@ -5,6 +5,9 @@ ENTRY(accept) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $5, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/acct.S b/libc/arch-x86/syscalls/acct.S index 02416bab6..6abaffc51 100644 --- a/libc/arch-x86/syscalls/acct.S +++ b/libc/arch-x86/syscalls/acct.S @@ -4,6 +4,8 @@ ENTRY(acct) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_acct, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/bind.S b/libc/arch-x86/syscalls/bind.S index 0628ddbd4..7c2acb544 100644 --- a/libc/arch-x86/syscalls/bind.S +++ b/libc/arch-x86/syscalls/bind.S @@ -5,6 +5,9 @@ ENTRY(bind) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $2, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/capget.S b/libc/arch-x86/syscalls/capget.S index 1c55147c2..aa7b43224 100644 --- a/libc/arch-x86/syscalls/capget.S +++ b/libc/arch-x86/syscalls/capget.S @@ -5,6 +5,9 @@ ENTRY(capget) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_capget, %eax diff --git a/libc/arch-x86/syscalls/capset.S b/libc/arch-x86/syscalls/capset.S index 485d2b0f0..6c3108350 100644 --- a/libc/arch-x86/syscalls/capset.S +++ b/libc/arch-x86/syscalls/capset.S @@ -5,6 +5,9 @@ ENTRY(capset) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_capset, %eax diff --git a/libc/arch-x86/syscalls/chdir.S b/libc/arch-x86/syscalls/chdir.S index b944bf865..a51ac6eeb 100644 --- a/libc/arch-x86/syscalls/chdir.S +++ b/libc/arch-x86/syscalls/chdir.S @@ -4,6 +4,8 @@ ENTRY(chdir) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_chdir, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/chroot.S b/libc/arch-x86/syscalls/chroot.S index 5ea29ae04..be8f68686 100644 --- a/libc/arch-x86/syscalls/chroot.S +++ b/libc/arch-x86/syscalls/chroot.S @@ -4,6 +4,8 @@ ENTRY(chroot) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_chroot, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/clock_getres.S b/libc/arch-x86/syscalls/clock_getres.S index 9af92785b..ce7e6f755 100644 --- a/libc/arch-x86/syscalls/clock_getres.S +++ b/libc/arch-x86/syscalls/clock_getres.S @@ -5,6 +5,9 @@ ENTRY(clock_getres) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_clock_getres, %eax diff --git a/libc/arch-x86/syscalls/clock_gettime.S b/libc/arch-x86/syscalls/clock_gettime.S index 0aff3328c..b1cdb1a20 100644 --- a/libc/arch-x86/syscalls/clock_gettime.S +++ b/libc/arch-x86/syscalls/clock_gettime.S @@ -5,6 +5,9 @@ ENTRY(clock_gettime) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_clock_gettime, %eax diff --git a/libc/arch-x86/syscalls/clock_nanosleep.S b/libc/arch-x86/syscalls/clock_nanosleep.S index 572d4a050..6c025e39a 100644 --- a/libc/arch-x86/syscalls/clock_nanosleep.S +++ b/libc/arch-x86/syscalls/clock_nanosleep.S @@ -7,6 +7,11 @@ ENTRY(clock_nanosleep) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/clock_settime.S b/libc/arch-x86/syscalls/clock_settime.S index 8aaf9d857..7c863e1a0 100644 --- a/libc/arch-x86/syscalls/clock_settime.S +++ b/libc/arch-x86/syscalls/clock_settime.S @@ -5,6 +5,9 @@ ENTRY(clock_settime) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_clock_settime, %eax diff --git a/libc/arch-x86/syscalls/close.S b/libc/arch-x86/syscalls/close.S index 2ceb2e1e8..3eb3be14f 100644 --- a/libc/arch-x86/syscalls/close.S +++ b/libc/arch-x86/syscalls/close.S @@ -4,6 +4,8 @@ ENTRY(close) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_close, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/connect.S b/libc/arch-x86/syscalls/connect.S index 37336ee89..c0d73cab4 100644 --- a/libc/arch-x86/syscalls/connect.S +++ b/libc/arch-x86/syscalls/connect.S @@ -5,6 +5,9 @@ ENTRY(connect) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $3, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/delete_module.S b/libc/arch-x86/syscalls/delete_module.S index 197a23af8..11ff762d1 100644 --- a/libc/arch-x86/syscalls/delete_module.S +++ b/libc/arch-x86/syscalls/delete_module.S @@ -5,6 +5,9 @@ ENTRY(delete_module) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_delete_module, %eax diff --git a/libc/arch-x86/syscalls/dup.S b/libc/arch-x86/syscalls/dup.S index 5854471e5..98070e245 100644 --- a/libc/arch-x86/syscalls/dup.S +++ b/libc/arch-x86/syscalls/dup.S @@ -4,6 +4,8 @@ ENTRY(dup) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_dup, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/dup3.S b/libc/arch-x86/syscalls/dup3.S index bb7c92fa5..4380e6a50 100644 --- a/libc/arch-x86/syscalls/dup3.S +++ b/libc/arch-x86/syscalls/dup3.S @@ -6,6 +6,10 @@ ENTRY(dup3) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/epoll_create1.S b/libc/arch-x86/syscalls/epoll_create1.S index e2e1e4171..ca5d4d109 100644 --- a/libc/arch-x86/syscalls/epoll_create1.S +++ b/libc/arch-x86/syscalls/epoll_create1.S @@ -4,6 +4,8 @@ ENTRY(epoll_create1) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_epoll_create1, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/epoll_ctl.S b/libc/arch-x86/syscalls/epoll_ctl.S index c71119d76..df345cdca 100644 --- a/libc/arch-x86/syscalls/epoll_ctl.S +++ b/libc/arch-x86/syscalls/epoll_ctl.S @@ -7,6 +7,11 @@ ENTRY(epoll_ctl) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/eventfd.S b/libc/arch-x86/syscalls/eventfd.S index 376a4f6ab..333bca48c 100644 --- a/libc/arch-x86/syscalls/eventfd.S +++ b/libc/arch-x86/syscalls/eventfd.S @@ -5,6 +5,9 @@ ENTRY(eventfd) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_eventfd2, %eax diff --git a/libc/arch-x86/syscalls/execve.S b/libc/arch-x86/syscalls/execve.S index 8e6c432be..95523bc2c 100644 --- a/libc/arch-x86/syscalls/execve.S +++ b/libc/arch-x86/syscalls/execve.S @@ -6,6 +6,10 @@ ENTRY(execve) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/faccessat.S b/libc/arch-x86/syscalls/faccessat.S index be95a0e16..0ad622411 100644 --- a/libc/arch-x86/syscalls/faccessat.S +++ b/libc/arch-x86/syscalls/faccessat.S @@ -7,6 +7,11 @@ ENTRY(faccessat) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/fchdir.S b/libc/arch-x86/syscalls/fchdir.S index a798322a2..4298c2a40 100644 --- a/libc/arch-x86/syscalls/fchdir.S +++ b/libc/arch-x86/syscalls/fchdir.S @@ -4,6 +4,8 @@ ENTRY(fchdir) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_fchdir, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/fchmod.S b/libc/arch-x86/syscalls/fchmod.S index 3dcf5dc75..d4ef36f62 100644 --- a/libc/arch-x86/syscalls/fchmod.S +++ b/libc/arch-x86/syscalls/fchmod.S @@ -5,6 +5,9 @@ ENTRY(fchmod) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_fchmod, %eax diff --git a/libc/arch-x86/syscalls/fchmodat.S b/libc/arch-x86/syscalls/fchmodat.S index 254fcb814..4fb6995b3 100644 --- a/libc/arch-x86/syscalls/fchmodat.S +++ b/libc/arch-x86/syscalls/fchmodat.S @@ -7,6 +7,11 @@ ENTRY(fchmodat) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/fchown.S b/libc/arch-x86/syscalls/fchown.S index 76298c483..326fe16e6 100644 --- a/libc/arch-x86/syscalls/fchown.S +++ b/libc/arch-x86/syscalls/fchown.S @@ -6,6 +6,10 @@ ENTRY(fchown) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/fchownat.S b/libc/arch-x86/syscalls/fchownat.S index fb295c48e..802dc44cf 100644 --- a/libc/arch-x86/syscalls/fchownat.S +++ b/libc/arch-x86/syscalls/fchownat.S @@ -8,6 +8,12 @@ ENTRY(fchownat) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/fdatasync.S b/libc/arch-x86/syscalls/fdatasync.S index 9ddf03b48..02e09bee2 100644 --- a/libc/arch-x86/syscalls/fdatasync.S +++ b/libc/arch-x86/syscalls/fdatasync.S @@ -4,6 +4,8 @@ ENTRY(fdatasync) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_fdatasync, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/fgetxattr.S b/libc/arch-x86/syscalls/fgetxattr.S index 2250c93f9..99a920d5a 100644 --- a/libc/arch-x86/syscalls/fgetxattr.S +++ b/libc/arch-x86/syscalls/fgetxattr.S @@ -7,6 +7,11 @@ ENTRY(fgetxattr) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/flistxattr.S b/libc/arch-x86/syscalls/flistxattr.S index 1ebd9bd66..a1691fc77 100644 --- a/libc/arch-x86/syscalls/flistxattr.S +++ b/libc/arch-x86/syscalls/flistxattr.S @@ -6,6 +6,10 @@ ENTRY(flistxattr) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/flock.S b/libc/arch-x86/syscalls/flock.S index c19edc7ce..a4388e988 100644 --- a/libc/arch-x86/syscalls/flock.S +++ b/libc/arch-x86/syscalls/flock.S @@ -5,6 +5,9 @@ ENTRY(flock) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_flock, %eax diff --git a/libc/arch-x86/syscalls/fremovexattr.S b/libc/arch-x86/syscalls/fremovexattr.S index 52b12886d..637797428 100644 --- a/libc/arch-x86/syscalls/fremovexattr.S +++ b/libc/arch-x86/syscalls/fremovexattr.S @@ -5,6 +5,9 @@ ENTRY(fremovexattr) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_fremovexattr, %eax diff --git a/libc/arch-x86/syscalls/fsetxattr.S b/libc/arch-x86/syscalls/fsetxattr.S index f0e75e2a8..2f926a56e 100644 --- a/libc/arch-x86/syscalls/fsetxattr.S +++ b/libc/arch-x86/syscalls/fsetxattr.S @@ -8,6 +8,12 @@ ENTRY(fsetxattr) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/fstat.S b/libc/arch-x86/syscalls/fstat.S index b37fc3fe0..daa4d7fd5 100644 --- a/libc/arch-x86/syscalls/fstat.S +++ b/libc/arch-x86/syscalls/fstat.S @@ -5,6 +5,9 @@ ENTRY(fstat) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_fstat64, %eax diff --git a/libc/arch-x86/syscalls/fstatat.S b/libc/arch-x86/syscalls/fstatat.S index ec517c546..7be868c5a 100644 --- a/libc/arch-x86/syscalls/fstatat.S +++ b/libc/arch-x86/syscalls/fstatat.S @@ -7,6 +7,11 @@ ENTRY(fstatat) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/fsync.S b/libc/arch-x86/syscalls/fsync.S index 4f589f4d0..71183cb57 100644 --- a/libc/arch-x86/syscalls/fsync.S +++ b/libc/arch-x86/syscalls/fsync.S @@ -4,6 +4,8 @@ ENTRY(fsync) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_fsync, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/ftruncate.S b/libc/arch-x86/syscalls/ftruncate.S index e64ead40b..100307757 100644 --- a/libc/arch-x86/syscalls/ftruncate.S +++ b/libc/arch-x86/syscalls/ftruncate.S @@ -5,6 +5,9 @@ ENTRY(ftruncate) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_ftruncate, %eax diff --git a/libc/arch-x86/syscalls/ftruncate64.S b/libc/arch-x86/syscalls/ftruncate64.S index 9d34c4faf..586086d48 100644 --- a/libc/arch-x86/syscalls/ftruncate64.S +++ b/libc/arch-x86/syscalls/ftruncate64.S @@ -6,6 +6,10 @@ ENTRY(ftruncate64) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/futex.S b/libc/arch-x86/syscalls/futex.S index 732878560..7a5291361 100644 --- a/libc/arch-x86/syscalls/futex.S +++ b/libc/arch-x86/syscalls/futex.S @@ -9,6 +9,13 @@ ENTRY(futex) pushl %esi pushl %edi pushl %ebp + .cfi_def_cfa_offset 24 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 + .cfi_rel_offset ebp, 20 mov 28(%esp), %ebx mov 32(%esp), %ecx mov 36(%esp), %edx diff --git a/libc/arch-x86/syscalls/getdents.S b/libc/arch-x86/syscalls/getdents.S index 1d681eedd..9823feb97 100644 --- a/libc/arch-x86/syscalls/getdents.S +++ b/libc/arch-x86/syscalls/getdents.S @@ -6,6 +6,10 @@ ENTRY(getdents) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/getgroups.S b/libc/arch-x86/syscalls/getgroups.S index 7c563fd13..e4247e72a 100644 --- a/libc/arch-x86/syscalls/getgroups.S +++ b/libc/arch-x86/syscalls/getgroups.S @@ -5,6 +5,9 @@ ENTRY(getgroups) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_getgroups32, %eax diff --git a/libc/arch-x86/syscalls/getitimer.S b/libc/arch-x86/syscalls/getitimer.S index 491cc8d81..2deebc99c 100644 --- a/libc/arch-x86/syscalls/getitimer.S +++ b/libc/arch-x86/syscalls/getitimer.S @@ -5,6 +5,9 @@ ENTRY(getitimer) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_getitimer, %eax diff --git a/libc/arch-x86/syscalls/getpeername.S b/libc/arch-x86/syscalls/getpeername.S index 432832092..e894093a3 100644 --- a/libc/arch-x86/syscalls/getpeername.S +++ b/libc/arch-x86/syscalls/getpeername.S @@ -5,6 +5,9 @@ ENTRY(getpeername) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $7, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/getpgid.S b/libc/arch-x86/syscalls/getpgid.S index ff69cbc18..c50a09f7a 100644 --- a/libc/arch-x86/syscalls/getpgid.S +++ b/libc/arch-x86/syscalls/getpgid.S @@ -4,6 +4,8 @@ ENTRY(getpgid) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_getpgid, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/getresgid.S b/libc/arch-x86/syscalls/getresgid.S index 3bfa9b9fb..ad74e56f5 100644 --- a/libc/arch-x86/syscalls/getresgid.S +++ b/libc/arch-x86/syscalls/getresgid.S @@ -6,6 +6,10 @@ ENTRY(getresgid) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/getresuid.S b/libc/arch-x86/syscalls/getresuid.S index c296ba8c8..6cf60b337 100644 --- a/libc/arch-x86/syscalls/getresuid.S +++ b/libc/arch-x86/syscalls/getresuid.S @@ -6,6 +6,10 @@ ENTRY(getresuid) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/getrlimit.S b/libc/arch-x86/syscalls/getrlimit.S index 1bf19d0b8..5e75b6bcb 100644 --- a/libc/arch-x86/syscalls/getrlimit.S +++ b/libc/arch-x86/syscalls/getrlimit.S @@ -5,6 +5,9 @@ ENTRY(getrlimit) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_ugetrlimit, %eax diff --git a/libc/arch-x86/syscalls/getrusage.S b/libc/arch-x86/syscalls/getrusage.S index b86d48dd4..2dfd00527 100644 --- a/libc/arch-x86/syscalls/getrusage.S +++ b/libc/arch-x86/syscalls/getrusage.S @@ -5,6 +5,9 @@ ENTRY(getrusage) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_getrusage, %eax diff --git a/libc/arch-x86/syscalls/getsid.S b/libc/arch-x86/syscalls/getsid.S index 3e3997c0e..1f6030914 100644 --- a/libc/arch-x86/syscalls/getsid.S +++ b/libc/arch-x86/syscalls/getsid.S @@ -4,6 +4,8 @@ ENTRY(getsid) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_getsid, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/getsockname.S b/libc/arch-x86/syscalls/getsockname.S index bd4fa1b4d..5c22bdfdc 100644 --- a/libc/arch-x86/syscalls/getsockname.S +++ b/libc/arch-x86/syscalls/getsockname.S @@ -5,6 +5,9 @@ ENTRY(getsockname) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $6, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/getsockopt.S b/libc/arch-x86/syscalls/getsockopt.S index 4f2c19a39..9c02d23ad 100644 --- a/libc/arch-x86/syscalls/getsockopt.S +++ b/libc/arch-x86/syscalls/getsockopt.S @@ -5,6 +5,9 @@ ENTRY(getsockopt) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $15, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/gettimeofday.S b/libc/arch-x86/syscalls/gettimeofday.S index f711b16b6..10c5de986 100644 --- a/libc/arch-x86/syscalls/gettimeofday.S +++ b/libc/arch-x86/syscalls/gettimeofday.S @@ -5,6 +5,9 @@ ENTRY(gettimeofday) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_gettimeofday, %eax diff --git a/libc/arch-x86/syscalls/getxattr.S b/libc/arch-x86/syscalls/getxattr.S index 93a1c415a..f491a0cd7 100644 --- a/libc/arch-x86/syscalls/getxattr.S +++ b/libc/arch-x86/syscalls/getxattr.S @@ -7,6 +7,11 @@ ENTRY(getxattr) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/init_module.S b/libc/arch-x86/syscalls/init_module.S index 4ed64f56b..1a159d32d 100644 --- a/libc/arch-x86/syscalls/init_module.S +++ b/libc/arch-x86/syscalls/init_module.S @@ -6,6 +6,10 @@ ENTRY(init_module) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/inotify_add_watch.S b/libc/arch-x86/syscalls/inotify_add_watch.S index 9222e62f8..424698dfb 100644 --- a/libc/arch-x86/syscalls/inotify_add_watch.S +++ b/libc/arch-x86/syscalls/inotify_add_watch.S @@ -6,6 +6,10 @@ ENTRY(inotify_add_watch) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/inotify_init1.S b/libc/arch-x86/syscalls/inotify_init1.S index 11496a56d..1b437c64e 100644 --- a/libc/arch-x86/syscalls/inotify_init1.S +++ b/libc/arch-x86/syscalls/inotify_init1.S @@ -4,6 +4,8 @@ ENTRY(inotify_init1) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_inotify_init1, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/inotify_rm_watch.S b/libc/arch-x86/syscalls/inotify_rm_watch.S index 83f5ccdc4..18ec3ca6a 100644 --- a/libc/arch-x86/syscalls/inotify_rm_watch.S +++ b/libc/arch-x86/syscalls/inotify_rm_watch.S @@ -5,6 +5,9 @@ ENTRY(inotify_rm_watch) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_inotify_rm_watch, %eax diff --git a/libc/arch-x86/syscalls/ioprio_get.S b/libc/arch-x86/syscalls/ioprio_get.S index 46bf8b529..6dfc76796 100644 --- a/libc/arch-x86/syscalls/ioprio_get.S +++ b/libc/arch-x86/syscalls/ioprio_get.S @@ -5,6 +5,9 @@ ENTRY(ioprio_get) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_ioprio_get, %eax diff --git a/libc/arch-x86/syscalls/ioprio_set.S b/libc/arch-x86/syscalls/ioprio_set.S index ba292eba0..bcefacbb3 100644 --- a/libc/arch-x86/syscalls/ioprio_set.S +++ b/libc/arch-x86/syscalls/ioprio_set.S @@ -6,6 +6,10 @@ ENTRY(ioprio_set) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/kill.S b/libc/arch-x86/syscalls/kill.S index 250e991fa..499158b0e 100644 --- a/libc/arch-x86/syscalls/kill.S +++ b/libc/arch-x86/syscalls/kill.S @@ -5,6 +5,9 @@ ENTRY(kill) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_kill, %eax diff --git a/libc/arch-x86/syscalls/klogctl.S b/libc/arch-x86/syscalls/klogctl.S index 22a4b3a6e..f422ac892 100644 --- a/libc/arch-x86/syscalls/klogctl.S +++ b/libc/arch-x86/syscalls/klogctl.S @@ -6,6 +6,10 @@ ENTRY(klogctl) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/lgetxattr.S b/libc/arch-x86/syscalls/lgetxattr.S index 1100a0152..def7c6682 100644 --- a/libc/arch-x86/syscalls/lgetxattr.S +++ b/libc/arch-x86/syscalls/lgetxattr.S @@ -7,6 +7,11 @@ ENTRY(lgetxattr) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/linkat.S b/libc/arch-x86/syscalls/linkat.S index 6aae8f5e0..ffb1b5d41 100644 --- a/libc/arch-x86/syscalls/linkat.S +++ b/libc/arch-x86/syscalls/linkat.S @@ -8,6 +8,12 @@ ENTRY(linkat) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/listen.S b/libc/arch-x86/syscalls/listen.S index 7fe8a5a1e..7e4d2f33f 100644 --- a/libc/arch-x86/syscalls/listen.S +++ b/libc/arch-x86/syscalls/listen.S @@ -5,6 +5,9 @@ ENTRY(listen) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $4, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/listxattr.S b/libc/arch-x86/syscalls/listxattr.S index a1c3888e9..5b94a7234 100644 --- a/libc/arch-x86/syscalls/listxattr.S +++ b/libc/arch-x86/syscalls/listxattr.S @@ -6,6 +6,10 @@ ENTRY(listxattr) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/llistxattr.S b/libc/arch-x86/syscalls/llistxattr.S index 66b25cda1..1c645916b 100644 --- a/libc/arch-x86/syscalls/llistxattr.S +++ b/libc/arch-x86/syscalls/llistxattr.S @@ -6,6 +6,10 @@ ENTRY(llistxattr) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/lremovexattr.S b/libc/arch-x86/syscalls/lremovexattr.S index 2d5009ff5..d67b221c0 100644 --- a/libc/arch-x86/syscalls/lremovexattr.S +++ b/libc/arch-x86/syscalls/lremovexattr.S @@ -5,6 +5,9 @@ ENTRY(lremovexattr) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_lremovexattr, %eax diff --git a/libc/arch-x86/syscalls/lseek.S b/libc/arch-x86/syscalls/lseek.S index 1ed5310e2..5a58b8174 100644 --- a/libc/arch-x86/syscalls/lseek.S +++ b/libc/arch-x86/syscalls/lseek.S @@ -6,6 +6,10 @@ ENTRY(lseek) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/lsetxattr.S b/libc/arch-x86/syscalls/lsetxattr.S index adaffcbb3..f2dba3989 100644 --- a/libc/arch-x86/syscalls/lsetxattr.S +++ b/libc/arch-x86/syscalls/lsetxattr.S @@ -8,6 +8,12 @@ ENTRY(lsetxattr) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/madvise.S b/libc/arch-x86/syscalls/madvise.S index 52d62a782..edd37b5f5 100644 --- a/libc/arch-x86/syscalls/madvise.S +++ b/libc/arch-x86/syscalls/madvise.S @@ -6,6 +6,10 @@ ENTRY(madvise) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/mincore.S b/libc/arch-x86/syscalls/mincore.S index 9e0bbefd8..44ea3648f 100644 --- a/libc/arch-x86/syscalls/mincore.S +++ b/libc/arch-x86/syscalls/mincore.S @@ -6,6 +6,10 @@ ENTRY(mincore) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/mkdirat.S b/libc/arch-x86/syscalls/mkdirat.S index 602208edf..d80e3fbde 100644 --- a/libc/arch-x86/syscalls/mkdirat.S +++ b/libc/arch-x86/syscalls/mkdirat.S @@ -6,6 +6,10 @@ ENTRY(mkdirat) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/mknodat.S b/libc/arch-x86/syscalls/mknodat.S index 643d310f7..20560dfa9 100644 --- a/libc/arch-x86/syscalls/mknodat.S +++ b/libc/arch-x86/syscalls/mknodat.S @@ -7,6 +7,11 @@ ENTRY(mknodat) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/mlock.S b/libc/arch-x86/syscalls/mlock.S index 4a663ee66..78cfa5867 100644 --- a/libc/arch-x86/syscalls/mlock.S +++ b/libc/arch-x86/syscalls/mlock.S @@ -5,6 +5,9 @@ ENTRY(mlock) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_mlock, %eax diff --git a/libc/arch-x86/syscalls/mlockall.S b/libc/arch-x86/syscalls/mlockall.S index ac3d6065d..4e78fefbe 100644 --- a/libc/arch-x86/syscalls/mlockall.S +++ b/libc/arch-x86/syscalls/mlockall.S @@ -4,6 +4,8 @@ ENTRY(mlockall) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_mlockall, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/mount.S b/libc/arch-x86/syscalls/mount.S index a7b4c1214..cc1a5187b 100644 --- a/libc/arch-x86/syscalls/mount.S +++ b/libc/arch-x86/syscalls/mount.S @@ -8,6 +8,12 @@ ENTRY(mount) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/mprotect.S b/libc/arch-x86/syscalls/mprotect.S index 75340ba0f..9c30af4f4 100644 --- a/libc/arch-x86/syscalls/mprotect.S +++ b/libc/arch-x86/syscalls/mprotect.S @@ -6,6 +6,10 @@ ENTRY(mprotect) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/mremap.S b/libc/arch-x86/syscalls/mremap.S index 3e77ebe0c..1439ef5b9 100644 --- a/libc/arch-x86/syscalls/mremap.S +++ b/libc/arch-x86/syscalls/mremap.S @@ -7,6 +7,11 @@ ENTRY(mremap) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/msync.S b/libc/arch-x86/syscalls/msync.S index 8a7c68dec..d330967d6 100644 --- a/libc/arch-x86/syscalls/msync.S +++ b/libc/arch-x86/syscalls/msync.S @@ -6,6 +6,10 @@ ENTRY(msync) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/munlock.S b/libc/arch-x86/syscalls/munlock.S index 868d00b28..ce6197dec 100644 --- a/libc/arch-x86/syscalls/munlock.S +++ b/libc/arch-x86/syscalls/munlock.S @@ -5,6 +5,9 @@ ENTRY(munlock) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_munlock, %eax diff --git a/libc/arch-x86/syscalls/munmap.S b/libc/arch-x86/syscalls/munmap.S index b0b524de6..be7eec629 100644 --- a/libc/arch-x86/syscalls/munmap.S +++ b/libc/arch-x86/syscalls/munmap.S @@ -5,6 +5,9 @@ ENTRY(munmap) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_munmap, %eax diff --git a/libc/arch-x86/syscalls/nanosleep.S b/libc/arch-x86/syscalls/nanosleep.S index 632baf504..9faa06b28 100644 --- a/libc/arch-x86/syscalls/nanosleep.S +++ b/libc/arch-x86/syscalls/nanosleep.S @@ -5,6 +5,9 @@ ENTRY(nanosleep) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_nanosleep, %eax diff --git a/libc/arch-x86/syscalls/perf_event_open.S b/libc/arch-x86/syscalls/perf_event_open.S index 931282a2a..ebbe1f066 100644 --- a/libc/arch-x86/syscalls/perf_event_open.S +++ b/libc/arch-x86/syscalls/perf_event_open.S @@ -8,6 +8,12 @@ ENTRY(perf_event_open) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/personality.S b/libc/arch-x86/syscalls/personality.S index 1d89a7cf1..8116e2df4 100644 --- a/libc/arch-x86/syscalls/personality.S +++ b/libc/arch-x86/syscalls/personality.S @@ -4,6 +4,8 @@ ENTRY(personality) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_personality, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/pipe2.S b/libc/arch-x86/syscalls/pipe2.S index 66c4bf198..c2e11a24f 100644 --- a/libc/arch-x86/syscalls/pipe2.S +++ b/libc/arch-x86/syscalls/pipe2.S @@ -5,6 +5,9 @@ ENTRY(pipe2) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_pipe2, %eax diff --git a/libc/arch-x86/syscalls/prctl.S b/libc/arch-x86/syscalls/prctl.S index cd09df7b1..1a5daca23 100644 --- a/libc/arch-x86/syscalls/prctl.S +++ b/libc/arch-x86/syscalls/prctl.S @@ -8,6 +8,12 @@ ENTRY(prctl) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/pread64.S b/libc/arch-x86/syscalls/pread64.S index 0a6ae2d13..32a76c5eb 100644 --- a/libc/arch-x86/syscalls/pread64.S +++ b/libc/arch-x86/syscalls/pread64.S @@ -8,6 +8,12 @@ ENTRY(pread64) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/pwrite64.S b/libc/arch-x86/syscalls/pwrite64.S index 7ad8ccf85..b003435a2 100644 --- a/libc/arch-x86/syscalls/pwrite64.S +++ b/libc/arch-x86/syscalls/pwrite64.S @@ -8,6 +8,12 @@ ENTRY(pwrite64) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/read.S b/libc/arch-x86/syscalls/read.S index a02435e6c..ad1c19a39 100644 --- a/libc/arch-x86/syscalls/read.S +++ b/libc/arch-x86/syscalls/read.S @@ -6,6 +6,10 @@ ENTRY(read) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/readahead.S b/libc/arch-x86/syscalls/readahead.S index 02d32ba42..a4d634f17 100644 --- a/libc/arch-x86/syscalls/readahead.S +++ b/libc/arch-x86/syscalls/readahead.S @@ -7,6 +7,11 @@ ENTRY(readahead) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/readlinkat.S b/libc/arch-x86/syscalls/readlinkat.S index 8548deb6a..37df8d8a3 100644 --- a/libc/arch-x86/syscalls/readlinkat.S +++ b/libc/arch-x86/syscalls/readlinkat.S @@ -7,6 +7,11 @@ ENTRY(readlinkat) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/readv.S b/libc/arch-x86/syscalls/readv.S index ebd9cafc4..05445c0ae 100644 --- a/libc/arch-x86/syscalls/readv.S +++ b/libc/arch-x86/syscalls/readv.S @@ -6,6 +6,10 @@ ENTRY(readv) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/recvfrom.S b/libc/arch-x86/syscalls/recvfrom.S index c266e9305..df489c86d 100644 --- a/libc/arch-x86/syscalls/recvfrom.S +++ b/libc/arch-x86/syscalls/recvfrom.S @@ -5,6 +5,9 @@ ENTRY(recvfrom) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $12, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/recvmsg.S b/libc/arch-x86/syscalls/recvmsg.S index df290595b..a587b00ae 100644 --- a/libc/arch-x86/syscalls/recvmsg.S +++ b/libc/arch-x86/syscalls/recvmsg.S @@ -5,6 +5,9 @@ ENTRY(recvmsg) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $17, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/removexattr.S b/libc/arch-x86/syscalls/removexattr.S index 1a974be78..99192f03e 100644 --- a/libc/arch-x86/syscalls/removexattr.S +++ b/libc/arch-x86/syscalls/removexattr.S @@ -5,6 +5,9 @@ ENTRY(removexattr) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_removexattr, %eax diff --git a/libc/arch-x86/syscalls/renameat.S b/libc/arch-x86/syscalls/renameat.S index 8d2a0ede5..831b24c36 100644 --- a/libc/arch-x86/syscalls/renameat.S +++ b/libc/arch-x86/syscalls/renameat.S @@ -7,6 +7,11 @@ ENTRY(renameat) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/sched_get_priority_max.S b/libc/arch-x86/syscalls/sched_get_priority_max.S index 089b576e6..0b7c26949 100644 --- a/libc/arch-x86/syscalls/sched_get_priority_max.S +++ b/libc/arch-x86/syscalls/sched_get_priority_max.S @@ -4,6 +4,8 @@ ENTRY(sched_get_priority_max) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_sched_get_priority_max, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/sched_get_priority_min.S b/libc/arch-x86/syscalls/sched_get_priority_min.S index 9e52f3002..ce28f8cd6 100644 --- a/libc/arch-x86/syscalls/sched_get_priority_min.S +++ b/libc/arch-x86/syscalls/sched_get_priority_min.S @@ -4,6 +4,8 @@ ENTRY(sched_get_priority_min) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_sched_get_priority_min, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/sched_getparam.S b/libc/arch-x86/syscalls/sched_getparam.S index 2221ecafd..2c3b7b9a0 100644 --- a/libc/arch-x86/syscalls/sched_getparam.S +++ b/libc/arch-x86/syscalls/sched_getparam.S @@ -5,6 +5,9 @@ ENTRY(sched_getparam) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_sched_getparam, %eax diff --git a/libc/arch-x86/syscalls/sched_getscheduler.S b/libc/arch-x86/syscalls/sched_getscheduler.S index 167a5d5d2..6a3842adb 100644 --- a/libc/arch-x86/syscalls/sched_getscheduler.S +++ b/libc/arch-x86/syscalls/sched_getscheduler.S @@ -4,6 +4,8 @@ ENTRY(sched_getscheduler) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_sched_getscheduler, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/sched_rr_get_interval.S b/libc/arch-x86/syscalls/sched_rr_get_interval.S index ee2ef0e89..c1055da6d 100644 --- a/libc/arch-x86/syscalls/sched_rr_get_interval.S +++ b/libc/arch-x86/syscalls/sched_rr_get_interval.S @@ -5,6 +5,9 @@ ENTRY(sched_rr_get_interval) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_sched_rr_get_interval, %eax diff --git a/libc/arch-x86/syscalls/sched_setaffinity.S b/libc/arch-x86/syscalls/sched_setaffinity.S index 5ef78eeeb..bd3d0ab3f 100644 --- a/libc/arch-x86/syscalls/sched_setaffinity.S +++ b/libc/arch-x86/syscalls/sched_setaffinity.S @@ -6,6 +6,10 @@ ENTRY(sched_setaffinity) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/sched_setparam.S b/libc/arch-x86/syscalls/sched_setparam.S index d993759f0..232926824 100644 --- a/libc/arch-x86/syscalls/sched_setparam.S +++ b/libc/arch-x86/syscalls/sched_setparam.S @@ -5,6 +5,9 @@ ENTRY(sched_setparam) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_sched_setparam, %eax diff --git a/libc/arch-x86/syscalls/sched_setscheduler.S b/libc/arch-x86/syscalls/sched_setscheduler.S index aa73874e7..a3ce8ab58 100644 --- a/libc/arch-x86/syscalls/sched_setscheduler.S +++ b/libc/arch-x86/syscalls/sched_setscheduler.S @@ -6,6 +6,10 @@ ENTRY(sched_setscheduler) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/sched_yield.S b/libc/arch-x86/syscalls/sched_yield.S index 41642f1d4..fb563c492 100644 --- a/libc/arch-x86/syscalls/sched_yield.S +++ b/libc/arch-x86/syscalls/sched_yield.S @@ -4,6 +4,8 @@ ENTRY(sched_yield) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_sched_yield, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/sendfile.S b/libc/arch-x86/syscalls/sendfile.S index 9bebc9952..280a4ae5c 100644 --- a/libc/arch-x86/syscalls/sendfile.S +++ b/libc/arch-x86/syscalls/sendfile.S @@ -7,6 +7,11 @@ ENTRY(sendfile) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/sendfile64.S b/libc/arch-x86/syscalls/sendfile64.S index 7032e8aae..383c8c6b2 100644 --- a/libc/arch-x86/syscalls/sendfile64.S +++ b/libc/arch-x86/syscalls/sendfile64.S @@ -7,6 +7,11 @@ ENTRY(sendfile64) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/sendmsg.S b/libc/arch-x86/syscalls/sendmsg.S index 410731f86..70bad2941 100644 --- a/libc/arch-x86/syscalls/sendmsg.S +++ b/libc/arch-x86/syscalls/sendmsg.S @@ -5,6 +5,9 @@ ENTRY(sendmsg) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $16, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/sendto.S b/libc/arch-x86/syscalls/sendto.S index c63bf08f6..dbe520dc2 100644 --- a/libc/arch-x86/syscalls/sendto.S +++ b/libc/arch-x86/syscalls/sendto.S @@ -5,6 +5,9 @@ ENTRY(sendto) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $11, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/setgid.S b/libc/arch-x86/syscalls/setgid.S index a15eab105..69ac15bfd 100644 --- a/libc/arch-x86/syscalls/setgid.S +++ b/libc/arch-x86/syscalls/setgid.S @@ -4,6 +4,8 @@ ENTRY(setgid) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_setgid32, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/setgroups.S b/libc/arch-x86/syscalls/setgroups.S index 9c2879a2d..f704c4648 100644 --- a/libc/arch-x86/syscalls/setgroups.S +++ b/libc/arch-x86/syscalls/setgroups.S @@ -5,6 +5,9 @@ ENTRY(setgroups) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_setgroups32, %eax diff --git a/libc/arch-x86/syscalls/setitimer.S b/libc/arch-x86/syscalls/setitimer.S index 0a2328d1a..157381652 100644 --- a/libc/arch-x86/syscalls/setitimer.S +++ b/libc/arch-x86/syscalls/setitimer.S @@ -6,6 +6,10 @@ ENTRY(setitimer) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/setns.S b/libc/arch-x86/syscalls/setns.S index 6bdb98cb4..2c39a21eb 100644 --- a/libc/arch-x86/syscalls/setns.S +++ b/libc/arch-x86/syscalls/setns.S @@ -5,6 +5,9 @@ ENTRY(setns) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_setns, %eax diff --git a/libc/arch-x86/syscalls/setpgid.S b/libc/arch-x86/syscalls/setpgid.S index 892323931..ae69633c4 100644 --- a/libc/arch-x86/syscalls/setpgid.S +++ b/libc/arch-x86/syscalls/setpgid.S @@ -5,6 +5,9 @@ ENTRY(setpgid) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_setpgid, %eax diff --git a/libc/arch-x86/syscalls/setpriority.S b/libc/arch-x86/syscalls/setpriority.S index 6a887f608..b58cd1303 100644 --- a/libc/arch-x86/syscalls/setpriority.S +++ b/libc/arch-x86/syscalls/setpriority.S @@ -6,6 +6,10 @@ ENTRY(setpriority) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/setregid.S b/libc/arch-x86/syscalls/setregid.S index 8748c1021..561a65895 100644 --- a/libc/arch-x86/syscalls/setregid.S +++ b/libc/arch-x86/syscalls/setregid.S @@ -5,6 +5,9 @@ ENTRY(setregid) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_setregid32, %eax diff --git a/libc/arch-x86/syscalls/setresgid.S b/libc/arch-x86/syscalls/setresgid.S index 22eb02d11..a21097508 100644 --- a/libc/arch-x86/syscalls/setresgid.S +++ b/libc/arch-x86/syscalls/setresgid.S @@ -6,6 +6,10 @@ ENTRY(setresgid) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/setresuid.S b/libc/arch-x86/syscalls/setresuid.S index 3a66ea674..920e68b7a 100644 --- a/libc/arch-x86/syscalls/setresuid.S +++ b/libc/arch-x86/syscalls/setresuid.S @@ -6,6 +6,10 @@ ENTRY(setresuid) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/setreuid.S b/libc/arch-x86/syscalls/setreuid.S index 16dd64e2a..7f911adc4 100644 --- a/libc/arch-x86/syscalls/setreuid.S +++ b/libc/arch-x86/syscalls/setreuid.S @@ -5,6 +5,9 @@ ENTRY(setreuid) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_setreuid32, %eax diff --git a/libc/arch-x86/syscalls/setrlimit.S b/libc/arch-x86/syscalls/setrlimit.S index cc69245db..e103ecfac 100644 --- a/libc/arch-x86/syscalls/setrlimit.S +++ b/libc/arch-x86/syscalls/setrlimit.S @@ -5,6 +5,9 @@ ENTRY(setrlimit) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_setrlimit, %eax diff --git a/libc/arch-x86/syscalls/setsockopt.S b/libc/arch-x86/syscalls/setsockopt.S index e927c2365..f56f81292 100644 --- a/libc/arch-x86/syscalls/setsockopt.S +++ b/libc/arch-x86/syscalls/setsockopt.S @@ -5,6 +5,9 @@ ENTRY(setsockopt) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $14, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/settimeofday.S b/libc/arch-x86/syscalls/settimeofday.S index 6c3b00b43..1ae4d588f 100644 --- a/libc/arch-x86/syscalls/settimeofday.S +++ b/libc/arch-x86/syscalls/settimeofday.S @@ -5,6 +5,9 @@ ENTRY(settimeofday) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_settimeofday, %eax diff --git a/libc/arch-x86/syscalls/setuid.S b/libc/arch-x86/syscalls/setuid.S index e7db8dadb..6549fd474 100644 --- a/libc/arch-x86/syscalls/setuid.S +++ b/libc/arch-x86/syscalls/setuid.S @@ -4,6 +4,8 @@ ENTRY(setuid) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_setuid32, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/setxattr.S b/libc/arch-x86/syscalls/setxattr.S index 98cafb46c..fae04dfbd 100644 --- a/libc/arch-x86/syscalls/setxattr.S +++ b/libc/arch-x86/syscalls/setxattr.S @@ -8,6 +8,12 @@ ENTRY(setxattr) pushl %edx pushl %esi pushl %edi + .cfi_def_cfa_offset 20 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 + .cfi_rel_offset edi, 16 mov 24(%esp), %ebx mov 28(%esp), %ecx mov 32(%esp), %edx diff --git a/libc/arch-x86/syscalls/shutdown.S b/libc/arch-x86/syscalls/shutdown.S index d1ea58957..13e8fd940 100644 --- a/libc/arch-x86/syscalls/shutdown.S +++ b/libc/arch-x86/syscalls/shutdown.S @@ -5,6 +5,9 @@ ENTRY(shutdown) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $13, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/sigaltstack.S b/libc/arch-x86/syscalls/sigaltstack.S index 58a299729..71fdb1202 100644 --- a/libc/arch-x86/syscalls/sigaltstack.S +++ b/libc/arch-x86/syscalls/sigaltstack.S @@ -5,6 +5,9 @@ ENTRY(sigaltstack) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_sigaltstack, %eax diff --git a/libc/arch-x86/syscalls/signalfd4.S b/libc/arch-x86/syscalls/signalfd4.S index 6e0c20bda..1fe6c6879 100644 --- a/libc/arch-x86/syscalls/signalfd4.S +++ b/libc/arch-x86/syscalls/signalfd4.S @@ -7,6 +7,11 @@ ENTRY(signalfd4) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/socket.S b/libc/arch-x86/syscalls/socket.S index 1bc6bd752..282681eb4 100644 --- a/libc/arch-x86/syscalls/socket.S +++ b/libc/arch-x86/syscalls/socket.S @@ -5,6 +5,9 @@ ENTRY(socket) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $1, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/socketpair.S b/libc/arch-x86/syscalls/socketpair.S index e2a98d34d..3681c4fac 100644 --- a/libc/arch-x86/syscalls/socketpair.S +++ b/libc/arch-x86/syscalls/socketpair.S @@ -5,6 +5,9 @@ ENTRY(socketpair) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov $8, %ebx mov %esp, %ecx addl $12, %ecx diff --git a/libc/arch-x86/syscalls/swapoff.S b/libc/arch-x86/syscalls/swapoff.S index 1d0831996..31f8be139 100644 --- a/libc/arch-x86/syscalls/swapoff.S +++ b/libc/arch-x86/syscalls/swapoff.S @@ -4,6 +4,8 @@ ENTRY(swapoff) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_swapoff, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/swapon.S b/libc/arch-x86/syscalls/swapon.S index f6f47c65c..687c4925c 100644 --- a/libc/arch-x86/syscalls/swapon.S +++ b/libc/arch-x86/syscalls/swapon.S @@ -5,6 +5,9 @@ ENTRY(swapon) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_swapon, %eax diff --git a/libc/arch-x86/syscalls/symlinkat.S b/libc/arch-x86/syscalls/symlinkat.S index 60115606f..1f33f7b6f 100644 --- a/libc/arch-x86/syscalls/symlinkat.S +++ b/libc/arch-x86/syscalls/symlinkat.S @@ -6,6 +6,10 @@ ENTRY(symlinkat) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/sync.S b/libc/arch-x86/syscalls/sync.S index 518b39e24..f80296f05 100644 --- a/libc/arch-x86/syscalls/sync.S +++ b/libc/arch-x86/syscalls/sync.S @@ -4,6 +4,8 @@ ENTRY(sync) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_sync, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/sysinfo.S b/libc/arch-x86/syscalls/sysinfo.S index 8fde6e46d..8b9a23e2e 100644 --- a/libc/arch-x86/syscalls/sysinfo.S +++ b/libc/arch-x86/syscalls/sysinfo.S @@ -4,6 +4,8 @@ ENTRY(sysinfo) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_sysinfo, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/tgkill.S b/libc/arch-x86/syscalls/tgkill.S index 9bd0b6fba..e57645cf5 100644 --- a/libc/arch-x86/syscalls/tgkill.S +++ b/libc/arch-x86/syscalls/tgkill.S @@ -6,6 +6,10 @@ ENTRY(tgkill) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/timerfd_create.S b/libc/arch-x86/syscalls/timerfd_create.S index 8546c34b9..33b298004 100644 --- a/libc/arch-x86/syscalls/timerfd_create.S +++ b/libc/arch-x86/syscalls/timerfd_create.S @@ -5,6 +5,9 @@ ENTRY(timerfd_create) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_timerfd_create, %eax diff --git a/libc/arch-x86/syscalls/timerfd_gettime.S b/libc/arch-x86/syscalls/timerfd_gettime.S index 5f3908049..66b004b6b 100644 --- a/libc/arch-x86/syscalls/timerfd_gettime.S +++ b/libc/arch-x86/syscalls/timerfd_gettime.S @@ -5,6 +5,9 @@ ENTRY(timerfd_gettime) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_timerfd_gettime, %eax diff --git a/libc/arch-x86/syscalls/timerfd_settime.S b/libc/arch-x86/syscalls/timerfd_settime.S index c017ca831..3f4035e6d 100644 --- a/libc/arch-x86/syscalls/timerfd_settime.S +++ b/libc/arch-x86/syscalls/timerfd_settime.S @@ -7,6 +7,11 @@ ENTRY(timerfd_settime) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/times.S b/libc/arch-x86/syscalls/times.S index 7ada37666..b9e284570 100644 --- a/libc/arch-x86/syscalls/times.S +++ b/libc/arch-x86/syscalls/times.S @@ -4,6 +4,8 @@ ENTRY(times) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_times, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/tkill.S b/libc/arch-x86/syscalls/tkill.S index 326efa3c2..f8da3697d 100644 --- a/libc/arch-x86/syscalls/tkill.S +++ b/libc/arch-x86/syscalls/tkill.S @@ -5,6 +5,9 @@ ENTRY(tkill) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_tkill, %eax diff --git a/libc/arch-x86/syscalls/truncate.S b/libc/arch-x86/syscalls/truncate.S index 06256217e..019894c31 100644 --- a/libc/arch-x86/syscalls/truncate.S +++ b/libc/arch-x86/syscalls/truncate.S @@ -5,6 +5,9 @@ ENTRY(truncate) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_truncate, %eax diff --git a/libc/arch-x86/syscalls/truncate64.S b/libc/arch-x86/syscalls/truncate64.S index 0a45f8a28..99b71b0a6 100644 --- a/libc/arch-x86/syscalls/truncate64.S +++ b/libc/arch-x86/syscalls/truncate64.S @@ -6,6 +6,10 @@ ENTRY(truncate64) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/umask.S b/libc/arch-x86/syscalls/umask.S index 3534340c5..485b3269b 100644 --- a/libc/arch-x86/syscalls/umask.S +++ b/libc/arch-x86/syscalls/umask.S @@ -4,6 +4,8 @@ ENTRY(umask) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_umask, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/umount2.S b/libc/arch-x86/syscalls/umount2.S index f5f9c66c0..100d38c39 100644 --- a/libc/arch-x86/syscalls/umount2.S +++ b/libc/arch-x86/syscalls/umount2.S @@ -5,6 +5,9 @@ ENTRY(umount2) pushl %ebx pushl %ecx + .cfi_def_cfa_offset 8 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 mov 12(%esp), %ebx mov 16(%esp), %ecx movl $__NR_umount2, %eax diff --git a/libc/arch-x86/syscalls/uname.S b/libc/arch-x86/syscalls/uname.S index 62035678d..f1ba3b926 100644 --- a/libc/arch-x86/syscalls/uname.S +++ b/libc/arch-x86/syscalls/uname.S @@ -4,6 +4,8 @@ ENTRY(uname) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_uname, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/unlinkat.S b/libc/arch-x86/syscalls/unlinkat.S index 8527c0b9d..1a573d45d 100644 --- a/libc/arch-x86/syscalls/unlinkat.S +++ b/libc/arch-x86/syscalls/unlinkat.S @@ -6,6 +6,10 @@ ENTRY(unlinkat) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/unshare.S b/libc/arch-x86/syscalls/unshare.S index 00214bd3d..95fdbf60a 100644 --- a/libc/arch-x86/syscalls/unshare.S +++ b/libc/arch-x86/syscalls/unshare.S @@ -4,6 +4,8 @@ ENTRY(unshare) pushl %ebx + .cfi_def_cfa_offset 4 + .cfi_rel_offset ebx, 0 mov 8(%esp), %ebx movl $__NR_unshare, %eax int $0x80 diff --git a/libc/arch-x86/syscalls/utimensat.S b/libc/arch-x86/syscalls/utimensat.S index 7869ebcce..099f5517b 100644 --- a/libc/arch-x86/syscalls/utimensat.S +++ b/libc/arch-x86/syscalls/utimensat.S @@ -7,6 +7,11 @@ ENTRY(utimensat) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/wait4.S b/libc/arch-x86/syscalls/wait4.S index c887b6cde..b6196f8d6 100644 --- a/libc/arch-x86/syscalls/wait4.S +++ b/libc/arch-x86/syscalls/wait4.S @@ -7,6 +7,11 @@ ENTRY(wait4) pushl %ecx pushl %edx pushl %esi + .cfi_def_cfa_offset 16 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 + .cfi_rel_offset esi, 12 mov 20(%esp), %ebx mov 24(%esp), %ecx mov 28(%esp), %edx diff --git a/libc/arch-x86/syscalls/write.S b/libc/arch-x86/syscalls/write.S index 60989affd..971cb3049 100644 --- a/libc/arch-x86/syscalls/write.S +++ b/libc/arch-x86/syscalls/write.S @@ -6,6 +6,10 @@ ENTRY(write) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/arch-x86/syscalls/writev.S b/libc/arch-x86/syscalls/writev.S index f7e8a9336..ab8e705a0 100644 --- a/libc/arch-x86/syscalls/writev.S +++ b/libc/arch-x86/syscalls/writev.S @@ -6,6 +6,10 @@ ENTRY(writev) pushl %ebx pushl %ecx pushl %edx + .cfi_def_cfa_offset 12 + .cfi_rel_offset ebx, 0 + .cfi_rel_offset ecx, 4 + .cfi_rel_offset edx, 8 mov 16(%esp), %ebx mov 20(%esp), %ecx mov 24(%esp), %edx diff --git a/libc/tools/gensyscalls.py b/libc/tools/gensyscalls.py index 58d1afd14..7b1afbbf4 100755 --- a/libc/tools/gensyscalls.py +++ b/libc/tools/gensyscalls.py @@ -147,7 +147,7 @@ mips_call = "/* " + warning + " */\n" + \ # x86 assembler templates for each syscall stub # -x86_registers = [ "%ebx", "%ecx", "%edx", "%esi", "%edi", "%ebp" ] +x86_registers = [ "ebx", "ecx", "edx", "esi", "edi", "ebp" ] x86_call = """\ movl $%(__NR_name)s, %%eax @@ -289,20 +289,26 @@ def mips_genstub(syscall): def x86_genstub(syscall): result = syscall_stub_header % syscall - stack_bias = 4 numparams = count_generic_param_registers(syscall["params"]) - for r in range(numparams): - result += " pushl " + x86_registers[r] + "\n" - stack_bias += 4 + stack_bias = numparams*4 + 4 + offset = 0 + mov_result = "" + cfi_result = " .cfi_def_cfa_offset %d\n" % (numparams*4) + for register in x86_registers[:numparams]: + result += " pushl %%%s\n" % register + mov_result += " mov %d(%%esp), %%%s\n" % (stack_bias+offset, register) + cfi_result += " .cfi_rel_offset %s, %d\n" % (register, offset) + offset += 4 - for r in range(numparams): - result += " mov %d(%%esp), %s" % (stack_bias+r*4, x86_registers[r]) + "\n" + if numparams: + result += cfi_result + result += mov_result result += x86_call % syscall - for r in range(numparams): - result += " popl " + x86_registers[numparams-r-1] + "\n" + for register in reversed(x86_registers[:numparams]): + result += " popl %%%s\n" % register result += x86_return % syscall return result @@ -315,27 +321,28 @@ def x86_genstub_socketcall(syscall): # from the original function called (socket()) result = syscall_stub_header % syscall - stack_bias = 4 # save the regs we need - result += " pushl %ebx" + "\n" - stack_bias += 4 - result += " pushl %ecx" + "\n" - stack_bias += 4 + result += " pushl %ebx\n" + result += " pushl %ecx\n" + result += " .cfi_def_cfa_offset 8\n" + result += " .cfi_rel_offset ebx, 0\n" + result += " .cfi_rel_offset ecx, 4\n" + stack_bias = 12 # set the call id (%ebx) - result += " mov $%d, %%ebx" % syscall["socketcall_id"] + "\n" + result += " mov $%d, %%ebx\n" % syscall["socketcall_id"] # set the pointer to the rest of the args into %ecx - result += " mov %esp, %ecx" + "\n" - result += " addl $%d, %%ecx" % (stack_bias) + "\n" + result += " mov %esp, %ecx\n" + result += " addl $%d, %%ecx\n" % (stack_bias) # now do the syscall code itself result += x86_call % syscall # now restore the saved regs - result += " popl %ecx" + "\n" - result += " popl %ebx" + "\n" + result += " popl %ecx\n" + result += " popl %ebx\n" # epilog result += x86_return % syscall