26/32-bit OSLib

Tom Hughes tom at compton.nu
Sat Nov 16 09:58:44 GMT 2002


In message <14ec37964b.rick at ravine.kpo.org.nz>
          Rick Hudson <rhudson at paradise.net.nz> wrote:

> Sorry - I don't think I thought things through properly before asking the
> question. As long as the code itself runs on any processor (ie the 32-bit
> version) then I guess it doesn't really matter whether its call standard is
> APCS-32 or APCS-R/32 because any code that has been compiled with a neutral
> compiler (that calls an OSLib function) won't care whether OSLib preserves
> flags or not.
> 
> That then makes me wonder what is the interaction make makes the version of
> SharedCLibrary important? OSLib doesn't call it does it?!

In order to link your code against OSLib32 you must compile it
for APCS-32 (ie use -apcs 3/32). If you don't do that then your
code may assume that a call to an OSLib function will preserve
flags when it won't.

If you compile for APCS-32 then you have to link against a
version of the C library stubs that supports APCS-32 applications.

Those APCS-32 stubs will then require a 32 bit SharedCLibrary as they
will call the 32 bit initialisation SWI which the older libraries don't
have.

Because of the current situation with RISC OS Ltd there is no way
for an application author to guarantee that a use is able to load an
appropriate library, so there is a need to continue shipping APCS-R
builds of applications, which in turn means that an APCS-R build of
library code such as OSLib is required.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the oslib-user mailing list