Abstract Although overlaying code segments is a very old technique, there is very little literature 68 on what the ground rules are, what the options are and how to select an overlay structure. As a result, the facilities provided by most linkage editors are much poorer than they need be. In this paper we define the problem, give an algorithm for obtaining ‘minimal’ overlay structures and describe the surrounding commands and environment that are necessary to turn this algorithm into a practical tool.