Re: Initialization of static anonymous-namespace members from a
dynamically loaded lib
On Jan 11, 6:07 pm, "Balog Pal" <p...@lib.hu> wrote:
"James Kanze" <james.ka...@gmail.com>
All I can say is that the meaning has changed. I learned most
of this stuff a long time ago, and back then, library very
definitely had the meaning I associate with it. (The
conversations I remember in the C committee also go back some in
time.) And in the Unix world, we spoke of "shared objects", and
not shared libraries. IMHO, we've lost something in loosing
this distinction.
Yeah, as I see it, the meaning of term "library" got diluted.
Not for really good. The original name "shared object" made
more sense.
Well, the most important single point is that it is dynamically
linked; sharing was the original motive, but a lot of "shared
objects" (e.g. plugins) aren't shared today. On the other hand,
I do think we've lost something concerning the word library:
originally, libraries where handled one way, and object files
another. Now, static libraries are handled one way, and object
files and dynamic libraries another. Seems less clear (or at
least more verbose) to me.
And the windoze name DLL meaning 'Dynamic Link Library' is
plain broken, as windows never had the linker involved at
execution time, the DLL is handled by the module loader and
only involves the segment/address fixups.
That's not really relevant. I don't think any system actually
invokes the linker when loading a dynamic object. I don't think
early SunOS did any fixups: the loaded object had to be position
independent code, and it used some sort of fixed table of
addresses at the beginning (I think---I'm not sure about the
second part). Ideally, you should be able to map the object
directly, without copying it into virtual memory in any way. (I
don't think modern object file formats support this, but I've
used some in the past that did.)
--
James Kanze