RISC OS Shared LibrariesBy Peter Naulls. Published: 29th Sep 2003, 12:41:42 | Permalink | Printable
One for everybodyNot exactly breaking news, but we've been meaning to cover this for sometime, and it remains relatively new to RISC OS.
Ask for the list of things people would like to see in RISC OS - Preemptive Multi-Tasking, improved memory protection, better browsing, etc, and possibly high on the list will appear shared libraries.
Shared libraries are just that - they are chunks of code that contain library functions that can be shared by many programs running at once. One of the important features of shared libraries is that they can be upgraded independently of the programs that use them, avoiding relinking.
Currently on RISC OS, if you want to use a newer version of a library with a program, you need to create a new binary, which will be statically linked with it, meaning that all the library code is included in your program's RunImage. This is particularly unfortunate for programs using things like UnixLib, which can be frequently changed.
There is an existing shared library system on RISC OS, but it's never been extensively used outside of the SharedCLibrary (I only know of one other example). It works via a stubs plus module system - whilst ok as far as it goes for the SharedCLibrary, isn't really ideal in general use. The code needs to exist in a module, which isn't the best, and you need a new SWI base for every module. It's all a bit fiddly and inflexible. Perhaps more importantly, it precludes automated generation of shared libraries from existing Unix build systems.
Of course, Linux, Windows and just about every other non-trival OS has a shared library system - in the form of .dll or .so files, but RISC OS has missed out, perhaps for historical reasons, and the minimal memory requirements of most RISC OS programs (memory saving being another advantage of shared libraries).
To the Rescue
Steven Simpson has started on a shared library system for RISC OS, and you can see his efforts on his RISC OS Shared Libraries page.
It's somewhat experimental, and certainly in its early stages, but you are of course encouraged to try it out. Steven tells drobe.co.uk he based his efforts on the requirements of the One True Dynamic Linker, in a document drawn up by ex-RISC OS user, Mark Wooding. Dynamic linking is a subset of the behaviour required by shared libraries, and essentially means code is loaded upon demand.
Steven's developments were done using GCCSDK under Unix, which shows you don't need to develop natively. Unfortunately, GCC itself can't yet create suitable code for dynamic linking in RISC OS (the problems being essentially those required to allow modules with GCC).
Hopefully in future we'll see practical use of this. In particular, UnixLib would greatly benefit from being a shared library.
RISC OS Shared Libraries
Previous: Porting free for all as UPP releases tools
Next: Midlands 2003 event cancelled - official
DiscussionViewing threaded comments | View comments unthreaded, listed by date | Skip to the end
Please login before posting a comment. Use the form on the right to do so or create a free account.
Search the archives
Today's featured article
Archive magazine reviewed
A media watch special
10 comments, latest by diomus on 27/10/07 12:01PM. Published: 23 Oct 2007
Get an Archimedes pin badge for Xmas - for 25 quid
It's mind-boggling what you can find on online auction house eBay - and in this instance, we've stumbled across this classy pin badge with the Acorn Archimedes logo on it. A snip at just 25 quid the last time we looked. Do you have any old Acorn memorabilia that could be flogged on eBay? Let everyone know in the comments below so we can compare our Acorn World plastic bags and such materials.
3 comments, latest by TonyStill on 11/12/08 9:45PM. Published: 10 Dec 2008
News and media:
RISCOS Ltd •
RISC OS Open •
MW Software •
Advantage Six •
CJE Micros •
Liquid Silicon •
Chris Why's Acorn/RISC OS collection •
The Register •
The Inquirer •
Apple Insider •
BBC News •
Sky News •
Google News •
© 1999-2009 The Drobe Team. Some rights reserved, click here for more information
Powered by MiniDrobeCMS, based on J4U | Statistics
"We incurred the wrath of Chris Williams, the main journalist at Drobe, who told us to 'Take our filthy spam and shove it where the sun doesn't shine'"
Page generated in 0.4426 seconds.