[klibc] [PATCH 0/1] Porting klibc to AArch64

Neil Williams codehelp at debian.org
Wed Oct 9 08:49:00 PDT 2013

On Wed, 9 Oct 2013 15:51:32 +0200
maximilian attems <maks at stro.at> wrote:

> On Wed, Oct 09, 2013 at 03:14:44PM +0530, Anil Singhar wrote:
> > Hi All:
> > 
> > We have some patches to port klibc to ArmV8.
> > 
> > The first set of patches from Neil Williams fixes the build issues.
> > The second set of patches from Anil Singhar fixes functionalities.
> pleasse come up with a single patchset for the architecture as it
> is not merged, with signed-offs by both of you guys.

Yes, we can do that. Do you prefer a patch to the mailing list or a git
repo from which you can pull? Anil's git repo is the combined set of
patches. I made some initial changes to get klibc to build for Aarch64,
Anil started from that position and fixed that code to actually get it
> > usr/klibc/arch/aarch64/Kbuild
> > usr/klibc/arch/aarch64/MCONFIG
> > usr/klibc/arch/aarch64/crt0.S
> > usr/klibc/arch/aarch64/link.c
> > usr/klibc/arch/aarch64/mknod.c
> > usr/klibc/arch/aarch64/select.c
> > usr/klibc/arch/aarch64/setjmp.S
> > usr/klibc/arch/aarch64/symlink.c
> > usr/klibc/arch/aarch64/syscall.S
> > usr/klibc/arch/aarch64/sysstub.ph
> > usr/klibc/arch/aarch64/vfork.S
> This looks very fishy!
> No other arch bothers to do such a rework
> of those standard calls, what happens here?

ARM took the chance with a brand new architecture to drop a range of
deprecated calls. As well as dropping a range of 32bit support (like
Thumb), ARM took the opportunity of having a clean start without
support for deprecated calls.

e.g. one part of the patch is:
-int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
+<!aarch64> int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *);

Others include: dup2, lchown32, chown32, stat64, lstat64, readlink, symlink, rmdir, mkdir, mknod ...

There was a talk at FOSDEM 2013 which covered these changes. There is
also documentation available from ARM, if you would like it.




Anil & I are working with Riku (the author of that paper) in Linaro.

(I'm using my debian.org email address because I started working on
klibc support for Aarch64 before I started working at Linaro.)
> I do have slight sympathies for vfork, but
> symlink, link, mknod and select!?

Yes. The system calls are already deprecated, so the new architecture
simply doesn't implement what is already deprecated.

pre-at system calls are also removed and calls like pipe have been
removed in favour of only providing pipe2. etc.



Neil Williams

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://www.zytor.com/pipermail/klibc/attachments/20131009/89fba67f/attachment.sig>

More information about the klibc mailing list