sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
- From: Remko van der Vossen <wich AT yuugen.jp>
- To: Dan Kociela <dkociela AT gmail.com>
- Cc: sm-discuss AT lists.ibiblio.org
- Subject: Re: [SM-Discuss] as-needed
- Date: Sun, 7 Sep 2014 19:44:27 +0200
Hi Dan,
Good to hear from our users!!
On Sun, Sep 07, 2014 at 11:14:55AM -0600, Dan Kociela wrote:
> Sorry everyone for the ignorance of this question. I'm an ordinary user.
> I've
> gone as far as writing a couple of simple spells, but never got around to
> cleaning them up enough to submit them. I want to say thanks in advance to
> anyone who takes the time to explain this.
> I'm using stable. What does it mean to "move to" or "switch on" as-needed?
as-needed is a linker option (actually --as-needed, or -Wl,--as-needed
if passed through the compiler) which you pass to the linker during
compilation time. This option causes the linker to omit DT_NEEDED
entries for libraries which are not directly used by the program or
library being compiled. DT_NEEDED entries are entries within an ELF
object, whether it be a program or library, which tell the dynamic
linker at load time which other libraries are needed to run the program.
The reason we need this is that all these extra DT_NEEDED entries in the
programs and libraries make the dependency tree way more complex and
thus make proper casting order very difficult to determine. Now one
might ask is it okay to just get rid of these DT_NEEDED entries, don't
we need them? No, we don't upon loading a program or library the dynamic
linker will resolve DT_NEEDED entries recursively so that everything
that needs to get loaded to get a working process image in memory will
get loaded. In other words we only need directly used libraries to be
mentioned as DT_NEEDED entries.
In the context of sorcery as-needed is an optimization option that has
been added to the latest devel sorcery, which will cause this linker
option to be passed to the linker for every spell casting. This will
make the dependency tree much more manageable and will allow ABI
incompatible changes such as there are with for example Xorg stuff,
libpng and icu to proceed with much less hassle. At the time of writing
this optimization option can only be found in devel sorcery, so you
would first need to switch to devel sorcery and get the latest version.
After that you can switch on as-needed in the Architecture Optimization
submenu of the sorcery Option Menu.
The specific steps:
1. > sorcery
2. Select Option menu
3. Select Sorcery Branch
4. Select Devel Branch
5. Exit sorcery
6. > sorcery update
7. > sorcery
8. Select Option menu
9. Select Optimize Architecture
10. Select your architecture (your currently used architecture is
already selected)
11. Switch on the as_needed optimization
12. Set any custom flags if you wish (not needed to set anything, but
you do need to select OK)
13. Exit Sorcery
Regards, Remko
-
[SM-Discuss] as-needed,
Dan Kociela, 09/07/2014
- Re: [SM-Discuss] as-needed, Remko van der Vossen, 09/07/2014
Archive powered by MHonArc 2.6.24.