mirror of https://git.musl-libc.org/git/musl
Browse Source
it will be needed to implement some things in sysconf, and the syscall can't easily be used directly because the x32 syscall uses the wrong structure layout. the l (uncreative, for "linux") prefix is used since the symbol name __sysinfo is already taken for AT_SYSINFO from the aux vector. the way the x32 override of this function works is also changed to be simpler and avoid the useless jump instruction.master
3 changed files with 9 additions and 7 deletions
@ -1,7 +1,10 @@ |
|||||
#include <sys/sysinfo.h> |
#include <sys/sysinfo.h> |
||||
#include "syscall.h" |
#include "syscall.h" |
||||
|
#include "libc.h" |
||||
|
|
||||
int sysinfo(struct sysinfo *info) |
int __lsysinfo(struct sysinfo *info) |
||||
{ |
{ |
||||
return syscall(SYS_sysinfo, info); |
return syscall(SYS_sysinfo, info); |
||||
} |
} |
||||
|
|
||||
|
weak_alias(__lsysinfo, sysinfo); |
||||
|
|||||
@ -1,5 +1 @@ |
|||||
.text |
# see arch/x32/src/sysinfo.c |
||||
.global sysinfo |
|
||||
.type sysinfo,@function |
|
||||
sysinfo: |
|
||||
jmp __x32_sysinfo |
|
||||
|
|||||
Loading…
Reference in new issue