• Michal Simek's avatar
    microblaze: Fix sys_clone syscall · 570e3e23
    Michal Simek authored
    sys_clone syscall ignored args which this patch mapped to args
    which are passing from glibc.
    
    Here is the origin problem description.
    
    "I ran the static libgcc tests (very few of them are there, they are
    mostly dynamically linked) and some of  them fail with an assertion in
    fork() system call (tid != pid), I looked at the microblaze/entry.S
    file and it looks suspicious (ignores arguments 3-5)"
    
    Arg mapping should be:
    glibc ARCH_FORK(...) -> do_fork(...)
    r5 -> r5   (clone_flags)
    r6  -> r6 (stack_start, use parent->stack if NULL)
    pt_regs -> r7 (pt_regs)
    r7 -> r8 (stack_size)
    r8 -> r9 (parent_tidptr)
    r9 -> r10 (child_tidptr)
    Signed-off-by: default avatarJohn Williams <john.williams@petalogix.com>
    Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
    570e3e23
entry.S 32.3 KB