[Libre-soc-bugs] [Bug 982] Support PowerPC ABI in ISACaller

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Sep 6 00:29:30 BST 2023


https://bugs.libre-soc.org/show_bug.cgi?id=982

--- Comment #13 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #12)
> (In reply to Jacob Lifshay from comment #11)
> > (In reply to Luke Kenneth Casson Leighton from comment #10)
> > > ah - ok i get it.  use strace -ff -o xxxx.out, it separates each
> > > process by PID.
> 
> ok, tried: strace -ff -o out.txt ./a.out

intriguing - no change... analysing:

> out.txt.71212:
> execve("./a.out", ["./a.out"], 0x7fffeb4d7bb8 /* 18 vars */) = 0

request to replace the current process by this one. whyy...
ohh you're not running grsecurity or se/linux or anything,
are you?

> brk(NULL)                               = 0x10037460000
> brk(0x10037460fe4)                      = 0x10037460fe4
> uname({sysname="Linux", nodename="75-224-155-23", ...}) = 0
> readlink("/proc/self/exe", "/home/jacob/a.out", 4096) = 17
> brk(0x10037490fe4)                      = 0x10037490fe4
> brk(0x100374a0000)                      = 0x100374a0000

hmmm... yes agreed, likely libc6 initialisation.

> openat(AT_FDCWD, "/proc/cmdline", O_RDONLY|O_CLOEXEC) = 3
> read(3, "root=UUID=0ff31a9e-7434-4c47-b03"..., 4096) = 86
> write(1, "root=UUID=0ff31a9e-7434-4c47-b03"..., 86) = 86
> read(3, "", 4096)                       = 0

expected

> exit_group(0)                           = ?

why exit_group - weird. i wonder if it's due to something
recent in libc6 and/or threading being enabled for some
reason.

it'd be good to get down to a minimum program... it's still massive
(due to whole unnecessary chunks of libc6 being dragged in, sigh)

----

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(int argc, char *argv[] ) {
    int fd = open("/tmp/x", O_CREAT, S_IRUSR);
    write(fd, "hello", 5);
    return 0;
}

----

$ history
  ...
  589  powerpc64-linux-gnu-gcc -static -static-libgcc open.c
  590  objdump -D a.out  > /tmp/x
  ...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list