4.2. Dynamic linking benefits

There are two main advantages to dynamic linking over static linking:

Shared libraries can be updated. For example, a media player application might originally be shipped with a codec that supports the mp3 file format. If the media player were statically linked it would not be possible to dynamically update it to support a different file format, without replacing the entire application. Dynamic linking means that a new version of the shared library containing a more up-to-date codec, which includes some enhancements and bug fixes, could be dynamically loaded by a dynamic linker into memory at run-time to replace the original shared library.

A shared library can also be shared by more than one application. For example, two different media players could both use the same shared library containing the same codec. This potentially means that the device running the application requires less physical memory, depending on the size of the dynamic linker.

Copyright © 2010 ARM. All rights reserved.ARM DAI 0242A