Subject: Re: RFC: Change SWI number base?
From: David Laight <email@example.com>
Date: 01/14/2002 13:25:23
Richard Earnshaw wrote:
> > I don't think there will be many cases where we will need to call a SWI
> > directly from thumb. Indeed the only case I can readily think of is the
> > compiler generating an IMB (for which it would be tricky to make it switch
> > into and out of ARM mode).
> Of course, an even cleaner solution would be to provide weak versions of
> (note I've dropped the '32') directly in libc, so that the compiler can
> just call the library function.
> [ They have to be weak since they aren't part of posix -- maybe we should
> also provide full symbols _arm_drain_writebuf etc that the compiler can
> use as alternate entry points ]
Presumably you need separate arm and thumb symbols?
Or are there separate arm and thumb libc? and no support for 'mixed'
Both names should be places firmly in the 'reserevd for the
implementation' namespace. Even then that is cluttered badly.
Making the symbols 'weak' helps nobody! If a user does define one his
application just dies terribly and he doesn't know why. At least he (is
likely to) get a link error if they are not weak (unless he defines an
uninitialised common item).