Static Linker
Static linking is the result of the linker copying all library routines used in the program into the executable image. This may require more disk space and memory than dynamic linking, but is more portable, since it does not require the presence of the library on the system where it runs
Disadvantages:
Every program generated must contain copies of exactly the same common system library functions. In terms of both physical memory and disk-space usage, it is much more efficient to load the system libraries into memory only once. Dynamic linking allows this single loading to happen.
- Library updates
- Large offsets required
- jal ra, proceed 1
- only 21 bit offset
- auipc t3, uimm20 // R[rd] = PC + {imm, 12b’0}
- add into the upper immediate place, the 12 remaining on the right are set to 0.
- jalr ra, imm12(t3) // PC = [rS1] +imm12
- this is the lower 12 bits
- gets stored into t3
- jal ra, proceed 1
Apparently, at Blackberry QNX. Prefer shared libraries, so Dynamic Linking. Because, libraries can be huge, by using dynamic linkage, we only link the libraries we need.