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.
- if symbol local, compiler resolve references , there no more do.
- if symbol global , position dependent symbols resolved @ link edit time (e.g., .a or .lib library).
- 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
Post a Comment