User Tools

Site Tools


toolchain

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
toolchain [2019/02/01 21:04]
raion [Runtime Symbol Resolution]
toolchain [2019/03/22 18:09] (current)
raion removed "you"'s from the article
Line 20: Line 20:
 ====IRIX LD==== ====IRIX LD====
 The IRIX linker is a traditional linker, unlike GNU ld. The basic implication of this is: The IRIX linker is a traditional linker, unlike GNU ld. The basic implication of this is:
-When processing modules on the command line, the IRIX ld requires that at least one reference to an unresolved symbol appear before inclusion of the library that resolves that reference. GNU ld uses a multi-pass algorithm to resolve undefined symbols, and so lets you specify libraries in an arbitrary order.+When processing modules on the command line, the IRIX ld requires that at least one reference to an unresolved symbol appear before inclusion of the library that resolves that reference. GNU ld uses a multi-pass algorithm to resolve undefined symbols, and so lets the developer ​specify libraries in an arbitrary order.
  
  
 ===Linking Shared Objects/​Libraries=== ===Linking Shared Objects/​Libraries===
-When you run a dynamically linked executable, the run-time linker, rld, identifies the libs required by the executable and loads the required libs. If necessary the IRIX kernel relocates libs within the process'​ virtual address space, so that no two libs occupy the same location. The program header of a dynamically linked executable contains a field, the liblist, which lists the libs required by the executable.+When a dynamically linked executable ​is ran, the run-time linker, rld, identifies the libs required by the executable and loads the required libs. If necessary the IRIX kernel relocates libs within the process'​ virtual address space, so that no two libs occupy the same location. The program header of a dynamically linked executable contains a field, the liblist, which lists the libs required by the executable.
  
 When looking for a lib, rld searches directories in a specific sequence: When looking for a lib, rld searches directories in a specific sequence:
Line 52: Line 52:
 IRIX uses a program called rld to link shared executables at runtime to linked libraries. IRIX uses a program called rld to link shared executables at runtime to linked libraries.
  
-Dynamically linked executables can contain symbol references that are not resolved before run time. Any symbol references in your main program or in an archive must be resolved at link time, unless one specifies the -ignore_unresolved argument to cc.+Dynamically linked executables can contain symbol references that are not resolved before run time. Any symbol references in the main program or in an archive must be resolved at link time, unless one specifies the -ignore_unresolved argument to cc.
  
 Libs may contain references that are not resolved at link time. All data symbols must be resolved at run time. If rld finds an unresolvable data symbol at run time, the executable exits with an error. Text symbols are resolved only when they are used, so a program can run with unresolved text symbols, as long as the unresolved symbols are not used. Libs may contain references that are not resolved at link time. All data symbols must be resolved at run time. If rld finds an unresolvable data symbol at run time, the executable exits with an error. Text symbols are resolved only when they are used, so a program can run with unresolved text symbols, as long as the unresolved symbols are not used.
  
 {{tag>​[Programming]}} {{tag>​[Programming]}}
toolchain.txt ยท Last modified: 2019/03/22 18:09 by raion