Re: Structure of large link libraries in f95



Walter Spector wrote:
Charles Russell wrote:

...
If 95-99% of the executable code is unused, how does that affect the
compile-link-execute time?
... Should I link in
my whole math library each time? Hard for me to believe that makes sense.


How big is your math library?

And is it possible that you'd want some of your routines in different
modules than others? No one says you need (or should) use one 'ginormous'
module. And remember that you get .o files for modules, just like you get
for non-module files. And you can place all of them in libraries.

Consider the case of a .a library that contains MODULE_A, MODULE_B, and
MODULE_C. If you USE MODULE_A and call a routine in it, the linker needn't
place the other modules into your executable file. Unless, of course,
someone in MODULE_A calls someone in one of the other modules. This works
jut like what you are used to in F77, except a bit coarser.


....

Linking to a static library only brings in those object file members that are actually referenced. You get the exact same result as listing all of the object files individually. A static lib is just a way to group files together.

Executables can get rather large from just from debugging info and symbols. Try compiling without debug options, then strip symbols from the result (strip <filename>).

Joe
.



Relevant Pages

  • Re: Shared library usage by the process
    ... The usual way for sharing a library involves deferring the linking until ... Some libraries are widely used, like libc and libm, and benefit well from ... to have the same function in each), or between all executables. ...
    (comp.unix.questions)
  • Re: Shared library usage by the process
    ... The usual way for sharing a library involves deferring the linking until ... Some libraries are widely used, like libc and libm, and benefit well from ... to have the same function in each), or between all executables. ...
    (comp.unix.programmer)
  • Re: HEADS-UP: Library version number bumps
    ... >> this is the list we think needs a version bump, ... They need to be bumped because the internal workings of the libraries ... You're right - there can be 5.X based binaries that will have ... At this point we need to decide which old executables break ...
    (freebsd-current)
  • Re: .EXE -> .ASM -> .EXE
    ... C/C++ executables. ... Also, though i am not sure, i think that Santosh is a FASM ... all the code in memory when the app runs. ... Libraries work under Windows, you would also know that they ...
    (alt.lang.asm)
  • Re: Whats different between Library (.a) and Shared object (.o)?
    ... Usually several object files are linked together to make an executable. ... .so files are shared libraries. ... But in contrast to static libraries, ... First of all, the executables are ...
    (comp.unix.programmer)