Re: Questions about linking.



Minix 3 doesn't support dynamic linking; we don't even have a ld.so
Thanks for above help.

My other question is about static linking.

For example, if one library (i.e. liba.a) include two functions : f1( )
and f2( ), one object file which calls f1( ) is statically linked with
liba.a to get a executable, then is the f1( ) linked into the
executable or the whole liba.a ?

In other words, does the linker select the necessary stuff , not the
whole, to get the executable?
If so,is it applied to the LIB's global variables which are accessed by
a object file?

Are all the global variables which come from different object files
collected in the LIB's data segment by the linker ?

Thanks.
lxbcyllt.

.



Relevant Pages

  • Re: static variables discarded by the VS.NET2003 linker
    ... an object file containing definitions of global variables of any type/ ... I simply added artificial references to the code, ... because both have back references and the linker would thus try to include ...
    (microsoft.public.vc.language)
  • Re: Questions about linking.
    ... My other question is about static linking. ... In other words, does the linker select the necessary stuff, not the ... During the linking phase the linker searches the libraries for unresolved symbols and when it finds them extracts a copy of the object file which is then linked as any object file in input to the linker. ...
    (comp.os.minix)
  • Re: how do you start learning assembly language
    ... You mean static linking, I imagine. ... object file that can be statically linked with another object file. ... A least a linker allows me to do so. ...
    (alt.lang.asm)
  • Re: <ctype.h> toLower()
    ... It does it in the same way as eg. XML is a documented format. ... >> I think the linker does a bit more than just join two object files ... > a function from an object file or a library, ... >> converts it to opcodes. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: overriding standard functions
    ... i imagined that when i compiled a c code then a linker would link my ... definitions of overridden standard functions, ... compiles cleanly with the compiler implementations i've tried ... In your example, since your object file is obviously first, it ...
    (comp.lang.c)