[uClibc]syscalls.c
Steve Thayer
sthayer at coactive.com
Mon Jun 25 19:04:24 UTC 2001
I think a reasonable compromise can be reached here. As Michael
states below, Linuxthreads does override some of the syscalls
to set the cancellation type, but only about 20 of the 120+
syscalls implemented by uClibc. So we'd be looking at only
20 additional weak aliases. If you'd like, I can have those
optionally compiled in only if pthread support is compiled in to
uClibc (this might make the code a little uglier, but it would
save space in the binary).
I also won't need to introduce any of the __function() calls to
uClibc if I change Linuxthreads to use uClibc's naming convention
instead (i.e. call function() instead of __function()). The end
result would be the same, and I wouldn't have to add any new weak
aliases.
Linuxthreads also uses some of the sched_* syscalls, which are not
currently implemented in uClibc, so I would have to add those as
well. There's only about five needed, so they shouldn't take up
much space, and again I can optionally compile them in when
including pthread support.
-Steve
> -----Original Message-----
> From: Michael Shmulevich [mailto:michaels at jungo.com]
> Sent: Sunday, June 24, 2001 1:20 AM
> To: andersen at lineo.com
> Cc: Steve Thayer; Uclibc (E-mail)
> Subject: Re: [uClibc]syscalls.c
>
>
> >
> >>Also, most of the syscalls that are implemented use strong names
> >>instead of weak, so it isn't possible to link in a different
> >>implementation if necessary. Glibc, for example, defines the
> >>syscall as "__name" and does a weak_alias(__name, name). That way
> >>you can write your own "name" implementation which overrides the
> >>syscall. uClibc defines the syscall as "name", which prevents
> >>overrides. Again, is there a reason for this that I just don't see?
> >>
> >
> > Each weak symbol takes a bit of space in the final binary.
> And also since I
> > think glibc is being somewhat abusive with the number of
> weak symbols it uses,
> > and since uClibc is intended to be small.
> >
> > Do you find you have a need to override syscalls?
>
> Linuxthreads library have an urge to override almost all syscalls,
> setting its cancelation type to something. It expects to find some
> syscalls to be named in a style of __libc_syscall() and not just
> syscall(). Except that, it also expects to use some libc
> functions using
> their internal name, like __function()... Expect to introduce some
> number of those to uClibc too.
>
>
> --
> Sincerely yours,
> Michael Shmulevich
> ______________________________________
> Software Developer
> Jungo - R&D
> email: michaels at jungo.com
> web: http://www.jungo.com
> Phone: 1-877-514-0537(USA) +972-9-8859365(Worldwide) ext. 233
> Fax: 1-877-514-0538(USA) +972-9-8859366(Worldwide)
>
More information about the uClibc
mailing list