[PATCH 6/6] i386: Remove syscall assembly codes with 6 arguments
H.J. Lu
hjl.tools@gmail.com
Mon Sep 14 14:39:00 GMT 2015
On Mon, Sep 14, 2015 at 7:30 AM, Andreas Schwab <schwab@suse.de> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> ifeq ($(subdir),misc)
>> sysdep_routines += ioperm iopl vm86
>> +# %ebp may be used to pass the 6th argument to syscall.
>> +CFLAGS-epoll_pwait.c += -fomit-frame-pointer
>> +CFLAGS-mmap.c += -fomit-frame-pointer
>> +CFLAGS-mmap64.c += -fomit-frame-pointer
>
> What happens if the compiler didn't succeed in eliminating the frame
> pointer?
>
For those functions, its won't be a problem with GCC older than
GCC 5 since EBP is saved/restored when making system calls
in asm statement. For GCC 5, you will get
../sysdeps/unix/sysv/linux/i386/mmap.c:34:1: error: bp cannot be used
in asm here
}
when -fno-omit-frame-pointer is used.
--
H.J.
More information about the Libc-alpha
mailing list