[Libre-soc-bugs] [Bug 982] Support PowerPC ABI in ISACaller
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Tue Sep 5 16:57:31 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=982
Jacob Lifshay <programmerjake at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |programmerjake at gmail.com
--- Comment #2 from Jacob Lifshay <programmerjake at gmail.com> ---
note that the list of actual syscalls that are needed to run a simple program
are a bit different:
I tested the following program on ppc64le:
gcc -x c - -static <<'EOF'
#include <stdio.h>
int main() {
FILE *f;
f = fopen("/proc/cmdline", "r");
if(!f) return 1;
while(1) {
int ch = fgetc(f);
if(ch == EOF) break;
putchar(ch);
}
int err = ferror(f);
fclose(f);
return err ? 1 : 0;
}
EOF
actual syscalls (ignore the initial execve):
strace ./a.out
execve("./a.out", ["./a.out"], 0x7fffed38eae0 /* 18 vars */) = 0
brk(NULL) = 0x1000c670000
brk(0x1000c670fe4) = 0x1000c670fe4
uname({sysname="Linux", nodename="75-224-155-23", ...}) = 0
readlink("/proc/self/exe", "/home/jacob/a.out", 4096) = 17
brk(0x1000c6a0fe4) = 0x1000c6a0fe4
brk(0x1000c6b0000) = 0x1000c6b0000
openat(AT_FDCWD, "/proc/cmdline", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "root=UUID=0ff31a9e-7434-4c47-b03"..., 1024) = 86
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0
write(1, "root=UUID=0ff31a9e-7434-4c47-b03"...,
86root=UUID=0ff31a9e-7434-4c47-b030-502a14729112 ro quiet disable_radix
init=/sbin/init
) = 86
read(3, "", 1024) = 0
close(3) = 0
exit_group(0) = ?
+++ exited with 0 +++
so, the list that needs is:
brk
uname
readlink
openat
fstat
read
write
close
exit_group
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list