linux-mips
[Top] [All Lists]

Re: Can modules be stripped?

To: Keith Owens <kaos@sgi.com>
Subject: Re: Can modules be stripped?
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Mon, 15 Apr 2002 17:32:54 +0200 (MET DST)
Cc: "MIPS/Linux List (SGI)" <linux-mips@oss.sgi.com>
In-reply-to: <7082.1018882200@ocs3.intra.ocs.com.au>
Organization: Technical University of Gdansk
Sender: owner-linux-mips@oss.sgi.com
On Tue, 16 Apr 2002, Keith Owens wrote:

> Exporting static symbols has always been allowed.  Exported symbols are
> the module equivalent of lazy binding, which is logically no different
> from passing the address of a static symbol via a structure to a
> registration function.  In either case the static symbol can be
> accessed from outside the object, without being marked as global.

 Well, if you make a symbol available to other modules it becomes global
implicitly as they may refer to it by its name (by means of relocations)
and not an address known from elsewhere.  So keeping the symbol marked
local in the module's symbol table is against a run-time linker's usual
behaviour.  One may expect to perform `ld -rx' on a module and have it
still work as it's what happens for every other relocatable. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


<Prev in Thread] Current Thread [Next in Thread>