c++ - How does a symbol table connect a symbol with its definition? -


i know implementation-defined, common features/approaches. how symbol table connect symbol definition when , when not definition present in current translation unit?

as understand it, can achieved in 3 ways.

  1. if symbol local, compiler resolve references , there no more do.
  2. if symbol global , position dependent symbols resolved @ link edit time (e.g., .a or .lib library).
  3. if symbol global , position dependent symbols resolved again link editor @ link time. rather being resolved directly, symbols referenced offset table. @ runtime, link loader resolve offsets (e.g., .so or .dll library).

see 'linkers & loaders' levine if book references. online, oracle's linker , libraries guide best i've read.


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -