dmdz
Walter Bright
newshound1 at digitalmars.com
Thu Mar 18 16:41:15 PDT 2010
Andrei Alexandrescu wrote:
> On 03/18/2010 06:00 PM, Walter Bright wrote:
>> Andrei Alexandrescu wrote:
>>> On 03/18/2010 05:11 PM, Walter Bright wrote:
>>>> Andrei Alexandrescu wrote:
>>>>> The basic interface is:
>>>>
>>>> Another thing needed for the interface is an associative array that
>>>> maps
>>>> a string to a member of the archive. Object code libraries do this (the
>>>> string is the unresolved symbol's name, the member is of course the
>>>> corresponding object file).
>>>
>>> Emphatically NO. Archives work with streams. You can build indexing on
>>> top of them.
>>
>> Such an interface won't work with .lib or .a archives. Both have an
>> embedded table of contents that is such an associative array - it's not
>> a list of file names, either, that's separate.
>
> Now I understand why linkers thrash the disk.
I think this is incorrect. The table of contents in the .lib files was designed
to work with a floppy disk system, and to minimize the number of disk reads. The
design of .a libraries is equivalent.
The thrashing of linkers came about on limited memory systems as the linker's
in-memory data set often exceeded physical ram. A typical linker run also simply
needs to read a lot of files.
> Anyway, my point is: indexing the archive should be not part of the
> basic interface. Such capabilities should be in an enhanced interface
> that builds upon the basic one.
That would be fine.
More information about the Digitalmars-d
mailing list