A segmented linker for generating from an original binary file an upgraded
binary file suitable for replacing a copy of the original binary file
installed in a target device. The segmented linker receives as inputs a
plurality of objects, the original binary file, and a memory map input
file associated with a target device. The segmented linker preserves in
the upgraded binary file at least some of the spatial locality of
reference of code in the original binary file. The segmented linker
further receives as an input a linker guideline file that defines the
layout of objects having spatial locality of reference in the original
binary file. The segmented linker uses the linker guideline file to limit
the propagation of cascading address references in the upgraded binary
file.