Re: How do linkers work?

tgakem@pebbles.chem.tue.nl (Eric Meijer)
21 Oct 1999 21:58:44 -0400

          From comp.compilers

Related articles
How do linkers work? dwilson@ttl.ie (Dave Wilson) (1999-10-21)
Re: How do linkers work? tgakem@pebbles.chem.tue.nl (1999-10-21)
Re: How do linkers work? adonovan@imerge.co.uk (Alan Donovan) (1999-10-21)
Re: How do linkers work? johnmce@texas.net (1999-10-21)
Re: How do linkers work? tgakem@pebbles.chem.tue.nl (1999-10-21)
Re: How do linkers work? strohm@airmail.net (1999-10-27)
| List of all articles for this month |

From: tgakem@pebbles.chem.tue.nl (Eric Meijer)
Newsgroups: comp.unix.programmer,comp.compilers
Date: 21 Oct 1999 21:58:44 -0400
Organization: Eindhoven University of Technology, The Netherlands
References: 99-10-097
Keywords: linker

Dave Wilson (dwilson@ttl.ie) wrote:
: I have a slight problem.
: [ program links library routine Bill() not called from the main program
: that calls Fred() ]


Static libraries contain object files. With `nm' you can see what
object files are there, and what functions they contain. The linker
always links complete object files, so that if Fred() and Bill() are
in the same object file, and you link Fred(), you also link Bill().
Object files in libraries that contain no functions that are used are
not linked.


HTH,
Eric


--
  E.L. Meijer (tgakem@pebbles.chem.tue.nl)
  Eindhoven Univ. of Technology
  Lab. for Catalysis and Inorg. Chem. (SKA)


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.