ARM OABI: fix 64-bit arguments decoding

ARM OABI and ARM EABI have different function parameters passing rules,
see commit v4.6-11-g7a5b08f for details.

* util.c (printllval): Do not align argument number in case of ARM OABI.
* file.c (sys_fadvise64_64): Likewise.
This commit is contained in:
Дмитрий Левин 2013-05-06 18:23:01 +00:00
parent a32b683704
commit 8e096c4ec5
2 changed files with 5 additions and 2 deletions

2
file.c
View File

@ -2677,7 +2677,7 @@ sys_fadvise64_64(struct tcb *tcp)
printfd(tcp, tcp->u_arg[0]);
argn = printllval(tcp, ", %lld, ", 1);
argn = printllval(tcp, "%lld, ", argn);
#if defined ARM || defined AARCH64 || defined POWERPC || defined XTENSA
#if defined __ARM_EABI__ || defined AARCH64 || defined POWERPC || defined XTENSA
printxval(advise, tcp->u_arg[1], "POSIX_FADV_???");
#else
printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???");

5
util.c
View File

@ -207,7 +207,10 @@ printllval(struct tcb *tcp, const char *format, int arg_no)
arg_no += 2;
}
#else
# if defined(ARM) || defined(POWERPC) || defined(LINUX_MIPSO32) || defined(XTENSA)
# if defined __ARM_EABI__ || \
defined LINUX_MIPSO32 || \
defined POWERPC || \
defined XTENSA
/* Align arg_no to the next even number. */
arg_no = (arg_no + 1) & 0xe;
# endif