ld: Principles of one-pass vs. two-pass

ld: Principles of one-pass vs. two-pass

Post by Joseph Talafou » Sun, 26 Jan 1997 04:00:00



Dear gurus:

Is there a hardcopy reference (title, author)
that can explain the principles of the UNIX
loader/linker, ESP. the difference between
one-pass/two-pass linkers.  I am spending
gobs of time permuting the order of my libraries,
indicating that I don't know the priciples
behind what a linker does.  I have spent a
chunk of time trying to locate such a reference
already and can assert that it is not readily
available.  (The Aho book is too general,
clarity counts.)

Any tips or suggestions or opinions greatly
appreciated.


Joe Talafous

 
 
 

ld: Principles of one-pass vs. two-pass

Post by Richard Scrant » Mon, 27 Jan 1997 04:00:00


If you are experiencing order-dependencies in your linkage, your linker
is probably an ancient 1-pass implementation.  When working with those,
it is not uncommon to see a library specified multiple times on the linker
command line, as in:

cc -o something something.o -lc -lsomethingelse -lc

> one-pass/two-pass linkers.  I am spending
> gobs of time permuting the order of my libraries,
> indicating that I don't know the priciples
> behind what a linker does.  I have spent a
> chunk of time trying to locate such a reference



cc: news & mail
----
========================================
Richard Scranton - LDA Systems, Columbus


 
 
 

ld: Principles of one-pass vs. two-pass

Post by James Youngm » Tue, 28 Jan 1997 04:00:00



Quote:

>Dear gurus:

>Is there a hardcopy reference (title, author)
>that can explain the principles of the UNIX
>loader/linker, ESP. the difference between
>one-pass/two-pass linkers.  I am spending
>gobs of time permuting the order of my libraries,
>indicating that I don't know the priciples
>behind what a linker does.  I have spent a
>chunk of time trying to locate such a reference
>already and can assert that it is not readily
>available.  (The Aho book is too general,
>clarity counts.)

>Any tips or suggestions or opinions greatly
>appreciated.

Save your time.  Just use -\( and -\).

--
James Youngman       VG Gas Analysis Systems |The trouble with the rat-race
 Before sending advertising material, read   |is, even if you win, you're
http://www.law.cornell.edu/uscode/47/227.html|still a rat.