[Top] [All Lists]

[PATCH] libattr 2.4.32 arm eabi system call calling convention

To: agruen@xxxxxxx, xfs@xxxxxxxxxxx
Subject: [PATCH] libattr 2.4.32 arm eabi system call calling convention
From: Lennert Buytenhek <buytenh@xxxxxxxxxxxxxx>
Date: Thu, 30 Nov 2006 03:54:59 +0100
Cc: linux-arm@xxxxxxxxxxxxxxxxxxxxxx
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=1148133259; d=wantstofly.org; h=date:from:to:cc:subject:message-id:mime-version:content-type: content-disposition:user-agent; b=IJcqT5klsiP17wMItSsyNsEHkpQ1q4dq233yThwcKjsUPAVeLkYnpko/5ms2F AMUPsQUjxW8B+3oRBR+P/gkzw==
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.1i
When building for EABI, a different system call calling convention is
used where system calls are numbered starting from zero, not 0x900000
as in the old ABI.  This was causing 'ls -al' with an ls binary that
was built with xattr support to SIGILL.

--- attr-2.4.32/libattr/syscalls.c.orig 2006-11-30 03:34:25.000000000 +0100
+++ attr-2.4.32/libattr/syscalls.c      2006-11-30 03:35:12.000000000 +0100
@@ -110,7 +110,11 @@
 # define __NR_fremovexattr     235
 #elif defined (__arm__)
-# define __NR_SYSCALL_BASE 0x900000
+# if defined(__ARM_EABI__) || defined(__thumb__)
+#  define __NR_SYSCALL_BASE 0
+# else
+#  define __NR_SYSCALL_BASE 0x900000
+# endif
 # define __NR_setxattr         (__NR_SYSCALL_BASE+226)
 # define __NR_lsetxattr                (__NR_SYSCALL_BASE+227)
 # define __NR_fsetxattr                (__NR_SYSCALL_BASE+228)

List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

<Prev in Thread] Current Thread [Next in Thread>