Home > Amiga & AROS > AmigaOS4 Shared Libraries ArticleAmigaOS4 Shared Libraries Article Mike Bouma 2003-08-09 Amiga & AROS 28 CommentsAmiga Inc has released another ‘Club Amiga Monthly’ article. This article written by Hans Joerg Frieden, one of the core AmigaOS4 developers, covers the Shared Libraries system for AmigaOS4.About The Author 28 Comments 2003-08-09 12:14 pm Good read! Looks to be a good approach. BTW, if you want to talk AmigaOS4/AmigaOne then these are two very good chatrooms:htt://chat.amigaworld.nethttp://www3.telus.net/NeRP/index.html 2003-08-09 3:10 pm What is so special about Shared and Static libraries as if they are not used under other Systems for years ? Even AROS and MorphOS make havy usage of them. 2003-08-09 3:22 pm This is not so much a “look how much better our shared library system is” article, but instead a “this is how the shared libraries work in AmigaOS4.0” article.Of course the original Amiga shared library system was still very innovative and advanced when it was first released in 1985 compared to rival OS solutions.> Even AROS and MorphOS make havy usage of them.They better, as the intention is to clone the classic AmigaOS 3.1 environment. 2003-08-09 3:33 pm Be warned, however, amigaworld.net chat is a very dangerous place ! 2003-08-09 3:51 pm “What is so special about Shared and Static libraries as if they are not used under other Systems for years ? Even AROS and MorphOS make havy usage of them.”Read the article. The problem was how to modernise the library system and allow use of both 68k and PPC code, without losing compatability.It is not about the well known concept of shared libraries as such. 2003-08-09 5:55 pm > > Even AROS and MorphOS make havy usage of them.> They better, as the intention is to clone the classic AmigaOS 3.1 environment. Hello Mike Bouma,Well I do agree with your first part of your reply but why am I getting the feeling that you play unfair with your last sentence ?Look, you wrote that sentence while beliving that AmigaOS is still the point of all measurements which is definately not true from todays point of views. MorphOS, AROS and AmigaOS all have the same root’s and philosophy behind it. They are trying to re-implement an AmigaOS 3.1 like system based on the known facts that you can find on all public locations. The first nominator here that tried a new attempt is AROS, AmigaOS3.5/3.9 inherited parts of AROS (by not doing unnecessary duplicate of Work) and MorphOS does so too. You wrote the sentence like it’s an of course for them to be as compatible to AmigaOS4.0 as possible due to standards, due the fact that YOU belive that AmigaOS4.0 will still be the leader of Amiga like Operating Systems. But the reality is that standards and acceptance is done by people who use the stuff someone else offers.Right now neither MorphOS or AROS are able to compare with AmigaOS4.0 ‘s changes so what standards are there that AROS or MorphOS should care for ? The nominator as said is definately a base 3.1 System. MorphOS and AROS are available, they both exchange code for not duplicating work they both are being used by increasing amounts of people. Standards sets only that system who’s successful in getting their people on their side by convince people of their work. It’s always the same in the computerlife of a person, standards are being set by those who are doing the work, who are trying to convince the people that their system is better and who are able to get as many people on their side as possible. Right now AROS and MorphOS are doing a great job to achieve this goal. MorphOS’s acceptance is increasing, many applications and games have been ported to it and I belive that there are many other people ‘right now’ working on projects for AROS and MorphOS.I understand that you defend your System which you are beliving into (like we all did, since we have the same roots). But we also need to be realistic here and use what’s there today, what has the biggest chance to survive on the long run, which we see other developers are porting their stuff onto it. Even if AROS or MorphOS are not API compatible with AmigaOS4.0 anymore then where is the problem ? We can simply turn the mirror around and say that AmigaOS4.0 is then not compatible to MorphOS and AROS anymore and thus will cause a lot of problems for people who like to use apps which have been ported or written for MorphOS only.AmigaOS4.0 has it’s chance to survive and we all wish them good luck and we hope (after 2 years of being said that it’s available already) that it sets new standards on PowerPC or x86 architectures but as long as it’s not released no one should declare it as THE STANDARD setter on AmigaOS like systems. Neither the bottom layer hardware have anything common with real Amiga hardware nor the changed OS’s have anything in common with them. AROS is written from scratch with the ideals to have it run hardware independantly on all types of System, MorphOS for sure don’t want to make the old AmigaOS like mistakes again and I really welcome that they cooperate with the AROS people in terms of code exchange. It will be quite trivial having MorphOS apps being ported to AROS and vice versa on the long run. As said earlier even AmigaOS3.5/3.9 inherited a bunch of parts from AROS in their code because the people have understood that code-reuse indeed makes sense. Why re-inventing a square wheel while it’s known that round wheels work better.I even think that AROS will still be available in 20 years regardless of the fact that it’s progressing slowly compared to MorphOS but it will survive. It starts attracting people because it’s getting usable and there are a lot of applications that work on AROS already (even MorphOS apps are available for AROS because of easy portage). Check out the AROS CD bootimage and test it. MorphOS definately is far ahead of AROS because of the many developers but going the AROS and MorphOS way makes sense for the people, they can still be sure to use either System one day even if MorphOS or AROS (one of both) fails, then we can still go and use our newly written Software on one of the other Systems. AmigaOS4.0 is not existing right now, nor do we know how API compatible it is with nowadays existing solutions, thus it can’t be said if it’s possible to port AROS or MorphOS related code to AmigaOS4.0 because of it’s API.And I seriously don’t want to be tied to a questionable future. I pretty much welcome that you defend AmigaINC, AmigaONE and AmigaOS4.0 but I also think we should wait until it shows up and play fair when it’s available:We then check (PowerPC compare of course):– which System has more native applications,– which System has less problems of porting existing apps,– which System has more users,– which System causes less problems to port to other known Amiga like solutions (AROS vs. MorphOS).Hope you understand my point here. You can’t go out and say ‘well the others are wrong, we do it right and we set standards’. The point here is that we are all comming from the same roots, most of the developers are intelligent people who know what they are doing and standards set that system who gets the majority of people on their side and where you can get many native applications for.AmigaOS4.0 is 2 years overdue and when it’s out then it needs to be revisited by users first, then getting checked what works and what not, then we need to see which system makes sense to stay on e.g. native applications etc. Your mistake is you underestimate the capabilities of other people. 2003-08-09 7:59 pm @ Uncle Sam>> They better, as the intention is to clone the classic>> AmigaOS 3.1 environment. > Well I do agree with your first part of your reply but> why am I getting the feeling that you play unfair with> your last sentence ?<big snip>Wow where did all that come from? (Please don’t make this another AROS vs AmigaOS vs MorphOS thread!)You brought up AROS/MorphOS yuourself and that they use shared libraries. As AmigaOS has had shared libraries since its introduction and in fact this is central to how the entire OS functions, any clone *needs* to “make havy usage” of this. AROS’ goal is to first clone all AmigaOS3.1 functionaliy. The AROS code used by H&P for AmigaOS3.5 was only with regard to a preference editor, I believe (certainly no low-level or critical OS parts).However MorphOS actually uses quite alot of AROS code. MorphOS was initially developed to run a real copy of Workbench3.1 on top of Quark microkernel with a reimplementation of the Amiga kickstart ROM (including a reimplemented exec kernel hosted). Eventually by using alot of AROS code and 3rd party alternative Amiga modules the MOS team eventually ended up with the current ABOX environment.So again: They better support the AmigaOS3.1 features as this is critical to how these operating systems function. This is not a “vs” thing just a simple fact. 2003-08-09 8:05 pm That’s one helluva long and creative reply to a very short and simple sentence.I just wish it made sense. It reads exactly like you decided you had a beef long before Mike Bouma hit the ‘send’ button.Oh, and he said AOS3.1 – perfectly accurately – while you start ranting about AOS 4.0. Not the same thing. Not is there any reason why AOS4.x and MOS (an offshoot project, as is AROS) should be forced to share the same API. No doubt it would make MOS users happier, but then they did choose to run an offshoot OS whose compatibility with AOS stops (and was always intended to) at OS3.1MOS needs to go its own way, not to be tied to another OS. Same applies to AOS. 2003-08-09 9:59 pm Hi Uncle SamJust checked the cd bootable AROS version. That is not something I would consider a usable product yet.I would say that OS4 is just as stable and usable as AROS atm. Because of the missing JIT emulation it’s not as fast as it should be but it will get there and it evolves MUCH faster than AROS atm.Offcourse OS4 is not available to the public yet, but it will be in the near future(When it’s done:)Regarding what system has the most users, applications etc., let’s take that discoussion again in a year, it will be much more interesting to see then. Right now with 3 diffrent systems in Beta state it’s not really interesting.regardsTroels, Just home from OS4 on tour (Denmark) 2003-08-09 10:08 pm This is some kind of technical commentary about some kind of technical library interface that IMO is not interesting or relevant to the average OSNews reader. IMO it is bad for OSNews when this kind of article is posted because it is dull and uninteresting to all but programmers and engineers (and I suppose advocates who point to it with little understanding and say “look, this shows how great my OS is”).Regular people interested in genuine operating system-related news will just go elsewhere. 2003-08-09 10:25 pm “This is some kind of technical commentary about some kind of technical library interface that IMO is not interesting or relevant to the average OSNews reader.”I find this response bizarre. This article covers the fundamental working of the Amiga OS (as is pointed out, this OS consists almost entirely of libraries), and how it is being updated. This should be of interest to anyone interested in operating systems.It is fairly hard stuff to understand, but after a couple of readings it is clearer. 2003-08-09 10:53 pm > Why Is This News?Many people interested in AmigaOS4 will find this article interesting to read. If AmigaOS4 news is of no interest to you personally you are free to skip any such news items.Daniel, just let me give you a simple example. Recently there was a MOS news item posted here regarding a ‘MOS Quickstart Guide for the Pegasos’. Your MOS supporting buddies like always hailed it as the next big thing… Now ask yourself how many OSNews readers would have any use for this document at all? (Especially considering there are only 600 Pegasos sold/given to people) Still you did not complain tjem and I believe for most people knowing you the reason seems obvious.This kind of behaviour makes the involved people look childish and really serves nobody any good. Instead of trying to say something to suit your personal agenda, I believe you should ask yourself: “What if this was MOS related? What would I do then?”. 2003-08-09 11:58 pm Don Cox says:> I find this response bizarre. This article covers the> fundamental working of the Amiga OS (as is pointed out,> this OS consists almost entirely of libraries), and> how it is being updated. This should be of interest to> anyone interested in operating systems.I went back and looked at it because you find my view that it is uninteresting to the average OSNews reader “bizarre.” Here is a quote from the article:“Since the function table is located in front of the library base, accessing a function works using a negative offset from the library base, with the first vector being located at -6, the second at -12 and so on. These vectors consist of a single 68k JMP instruction followed by four bytes of function address (hence these vectors are 6 bytes apart). A program simply does a direct subroutine jump into this vector, which then branches to the appropriate routine.”There’s other writing in there that is similarly technical. Sorry that you disagree but I really think that this is dull and uninteresting to the average OSNews reader, and really not big enough news either. I’ll elaborate. Let’s look at the article posted after it. ’64bit Java’ hmm… that is kind of interesting. And before it ‘New Omniweb and Other Browser News’ ummm, yeah that is interesting. And continuing ‘New GCC Version,’ ‘the Future of NetWare,’ ‘.NET Framework Info,’ and ‘AROS Monthly Update.’ All of those are kind of interesting. I don’t notice news articles about the library approach of QNX or OS/2 or other technical aspects of those operating systems. You’ll get relevant stuff for those, for instance ‘OS/2 now has a Java port.’ IMO that is newsworthy.Mike implies that I am hypocritical for not making a similar criticism of an article on MorphOS Quickstart Guide but I never saw any such article. The most recent MorphOS-oriented article I see tells about a TV show where MorphOS and Pegasos were featured. Sorry but that seems kind of interesting to me, it’s exposure for an alternative platform. He blabs on about people who know me see my interior motives but I have written articles which praised OS4 presentations and panned MorphOS presentations at conventions. The fact is I call it like I see it, or at least I try to.And Don, the way I see this is that “Amiga OS4 Shared Libraries Article” is dull, uninteresting, and technical. You are welcome to disagree but I don’t think my view is “bizarre.” 2003-08-10 12:23 am > There’s other writing in there that is similarly> technical.Here’s a quote with regard to our audience: “Our readership is the “Geek Elite” of the technology world; those who intently follow the trends in computing that lie over the horizon.”http://www.osnews.com/advertise.php> Sorry that you disagree but I really think that this is> dull and uninteresting to the average OSNews readerThere are many different opinions on what is interesting and what is not. For example I enjoyed reading all these technical CAM articles. If you would walk to a random person I believe there’s a very good chance that they will find OSNews dull and boring in general! > The most recent MorphOS-oriented article I see tells> about a TV show where MorphOS and Pegasos were featured.> Sorry but that seems kind of interesting to meDon’t be sorry. Taste does differ (IMO the key is to accept other people’s preferences), but to play the devil’s advocate here are some reasons why someone could NOT find that really an interesting news item:For starters it’s in German. (We mostly link to English websites as a very large percentage of readers don’t understand a word which was stated on that page). Giga.de covers alot more than just the Pegasos and thus this could be considered not to be newsworthy as it tells nothing new, would you consider it newsworthy for OSNews to report when Giga covers the Macintosh, Windows, Playstation or for example an AtariST? 2003-08-10 2:51 am There’s other writing in there that is similarly technical. Sorry that you disagree but I really think that this is dull and uninteresting to the average OSNews reader, and really not big enough news either.Well, some of us can actually use our brains and just don’t want to be spoon fed press releases. And do you really think more people care about OS/2 than AmigaOS 4? 2003-08-10 3:51 am I find it interesting that it seems to be focused around 86K and PPC code……..Though I made a comment on another board regarding the article and how it now, being publicly available information, can be used by those “cloning” the Amiga OS as to how they might deal with the issue PPC ports……… I really have to take note that AROS is currently running on x86 hardware, though being ported to PPC.Perhaps AROS is the exception?Being that it is being written from scratch with intent to be portable across platforms and CPU architectures…AROS seems to be the one that has by far the greatest incentive to be cross platform compatable.Perhaps the article is helpful to the AROS team, now that it is public information? 2003-08-10 5:41 am Does the Amiga still call the library *.library or has it chosen a more “trendy” way of doing things? The one thing I always did like about the Amiga was the ability to be able to use the computer without the need to stuff around tweaking and trying to get things working.I remember back in the old IBM-Compatible days seeing fanboys talk about how great their green-and-black screen was, and how*great* a the beep generated music they had when playing games.Here was me on my Amiga, playing games with 8bit audio (with a stereo hooked up for extra “buzz”), playing arcade style games in full colour using an arcade style joy stick.It was even more funny when the atari people got on board and could crow the merits of their system over the IBM.Funny how the IBM is now the “standard”, not because it is superior but because there is a hype generating market machine behind it. Heck, and you don’t even need to be innovative to make money, just look at Dell and their $0 R&D approach. 2003-08-10 10:37 am “There’s other writing in there that is similarly technical. Sorry that you disagree but I really think that this is dull and uninteresting to the average OSNews reader, and really not big enough news either. ”Operating systems are a technical topic. This is a technical web site.I think a major technical development in an OS which is at least interesting because it is not another version of UNIX is highly significant. The article was written in clear language which would present no problems to anyone with a small experience of programming.Some diagrams would have helped, I suppose.The “average OSNews reader” seems to be a person who programs for a UNIX style platform. Perhaps you are more interested in the sales and marketing of computers? If so, I am sure there are sites that you would find more interesting than OSNews. 2003-08-10 10:45 am “Does the Amiga still call the library *.library or has it chosen a more “trendy” way of doing things? ”Sure. Nothing like that has changed, although I was sorry to see a new library called “ft2.library” instead of “freetype2.library”. Why be cryptic?A bad feature of AmigaOS is that important system directories are called C:, L: and S: instead of Commands:, Handlers: and Scripts: C: in particular causes confusion with the cp/m use of A:, B:, and C: for disk drives.(The colons indicate that they are logical directories.)Of course you can patch this with assigns, but it was an error in the original design. 2003-08-10 1:09 pm Don Cox wrote:> The “average OSNews reader” seems to be a person who> programs for a UNIX style platform.I find this statement bizarre. OSNews has plenty of headlines that are not tailored to UNIX style platform programmers. 2003-08-10 1:37 pm ts says:> Well, some of us can actually use our brains and just> don’t want to be spoon fed press releases. And do you> really think more people care about OS/2 than AmigaOS> 4?Many people prefer to use their brains for other things besides a technical treatise on the use of an internal library system. Let’s look at some more from the article:“To obtain an instance of the interface, the program must call Exec’s “GetInterface” function. This function accepts both the library base pointer and an ASCII name string as an argument, and creates and/or returns a pointer to the interface that was queried. For this purpose, interfaces are identified by a name. Most libraries export their main interface under the name of “main”, but this naming is not required. As an example, Exec library exports the “main” interface of type “ExecIFace”, and an “mmu” interface of type “MMUIFace” (the latter one being a control interface for using the Memory Management Unit of the PowerPC).”I leave it to the owners and editors of this site to determine if the above is what OSNews is about, it doesn’t seem like it to me. Looking over the article it almost seems as if the author is really generating text for a technical manual, and then the text was repackaged into an “article.” I am not criticizing the text or its author, I am only questioning whether it should be promoted as a headline on a news site.Now as for your comment on OS/2. As people who regularly read news about operating systems are aware, OS/2 is still of interest to many people and lives today as E-Commerce Station and in other forms. See http://www.ecomstation.com for more. As for your question ‘do I really think more people care about OS/2 than AmigaOS4’ well I better just leave that one alone however if you look at OS/2 community you will see a lot of happening things like the Java port and Warpstock Europe 2003. 2003-08-10 1:47 pm Timothy Rue says:> AROS seems to be the one that has by far the greatest> incentive to be cross platform compatable.Genesi says AROS has reached an advanced state in its version for the Pegasos, as compared to other OSs like Open Darwin which are listed as less advanced.http://www.pegasosppc.com/operating_systems.phpWe need independent reviews first but this would indicate that AROS is living up to its intention to be cross-platform. Some people see AROS as the dark horse which will be in a superior state when the current sound and fury subsides and the Amiga community evolves to its next state. 2003-08-10 2:25 pm “Many people prefer to use their brains for other things besides a technical treatise on the use of an internal library system.”But why not use your brain to understand how OSes work too? It is an interesting topic, and understanding one subject doesn’t prevent you from understanding another.I found the article very interesting. It was one of the most interesting things I’ve read in the past week. Another was thishttp://pcangelo.eng.unipr.it/Public/AES-114/00048.pdfon the theory of surround sound.But that is probably “too technical” for you too. 2003-08-10 3:10 pm Mr Miller you are seriously under-estimating OSNews readers for their technical interests and knowledge! 2003-08-10 3:32 pm RE: Daniel Miller (IP: —.nas63.philadelphia1.pa.us.da.qwest.net)You do know that there is a world outside the shores of the United States and yes, the Amiga is still alive and well in many quarters. Heck, I still know people in Australia and New Zealand who religiously use it.When I was working at my local ISP we had 5 people on our register who were Amiga users, oh and yes, I was the Amiga Tech support person along with providing support to Linux users needing information on how to setup roaring penguin.RE: Don Cox (IP: —.midd.cable.ntl.com) – Posted on 2003-08-10 10:45:53“Does the Amiga still call the library *.library or has it chosen a more “trendy” way of doing things? ” Sure. Nothing like that has changed, although I was sorry to see a new library called “ft2.library” instead of “freetype2.library”. Why be cryptic? I don’t understand either. I mean, heck, Windows NTFS can support files named nvidia.driver, so why on gods green earth do Microsoft insist on using *.drv. Better yet, why do they have dll? why not, CommonControls.DynamicLibrary, wouldn’t that be alot easier.A bad feature of AmigaOS is that important system directories are called C:, L: and S: instead of Commands:, Handlers: and Scripts: C: in particular causes confusion with the cp/m use of A:, B:, and C: for disk drives. (The colons indicate that they are logical directories.) Of course you can patch this with assigns, but it was an error in the original design.I’ve always thought it was /libraries, /drivers, /preferences, having not used the Amiga Workbench 1.3 in around 9 years I may be a little rusty on the situation. 2003-08-10 5:05 pm “I’ve always thought it was /libraries, /drivers, /preferences, having not used the Amiga Workbench 1.3 in around 9 years I may be a little rusty on the situation.”You are a little rusty. There are system directories called Libs, Devs (=devices), and Prefs. Not ideal, but better than the single letters used for C, L and S.There are 16 system directories altogether on the boot partition in a default install. 2003-08-15 7:52 pm “To obtain an instance of the interface, the program must call Exec’s “GetInterface” function. This function accepts both the library base pointer and an ASCII name string as an argument, and creates and/or returns a pointer to the interface that was queried. For this purpose, interfaces are identified by a name. Most libraries export their main interface under the name of “main”, but this naming is not required. As an example, Exec library exports the “main” interface of type “ExecIFace”, and an “mmu” interface of type “MMUIFace” (the latter one being a control interface for using the Memory Management Unit of the PowerPC).”We’ve known about AOS4’s intention to replace the simple, elegant, efficient Jumptable of the original Exec style libraries with a Win32 style interface for a long time.This is their atempt to OO the Amiga library system. I don’t like it, personally, that’s why I choose the AROS project (which sticks to Jumptables). But as always AROS does have a little trick up it’s sleve… We call it CABOOM (In honor of the Amiga’s original OOP system BOOPSI)… 2003-08-16 9:27 am @ts: ‘…and do you really think more people care about OS/2 than AmigaOS 4?’Uhh, yes.