Skip to content
  • Max Filippov's avatar
    linux-user/flatload: fix initial stack pointer alignment · 5c76d652
    Max Filippov authored
    
    
    Stack pointer alignment code incorrectly adds stack_size to sp instead
    of subtracting it. It also does not take flat_argvp_envp_on_stack() into
    account when calculating stack_size. This results in initial stack
    pointer misalignment with certain set of command line arguments and
    environment variables and correct alignment for the same binary with a
    different set of arguments. This misalignment causes failures in the
    following tests in the testsuite of gcc built for xtensa uclinux:
    
      gcc.dg/torture/vshuf-v64qi.c
      gcc.dg/torture/vshuf-v8sf.c
      gcc.dg/torture/vshuf-v8si.c
    
    Reviewed-by: default avatarLaurent Vivier <lvivier@redhat.com>
    Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
    5c76d652