When establishing a link between two local documents, the HTX linker has a choice of using an absolute file name for the target, or a relative one. The rule used is that relative cross-references are always generated if two documents reside in the same document library (i.e. the same directory), otherwise an absolute name is used.
This means that if a document library is moved, all cross-links between documents within it will remain intact. Only those from documents outside the library will fail and require re-linking.