COFF files were not designed to support relocation after link-time:
The binary format used initially for Linux was an a.out
variant. When introducing shared libraries certain design
decisions had to be made to work in the limitations of
a.out
. The main accepted limitation was that no relocations are performed at the time of loading and afterward.
The shared libraries have to exist in the form they are
used at run-time on disk. This imposes a major restriction on the way shared libraries are built and used: every
shared library must have a fixed load address; otherwise it
would not be possible to generate shared libraries which
do not have to be relocated.1
While XCOFF represents an extension of COFF that does support use of shared libraries, the relocation information removed by strip
pertains to information used for link-time relocation rather than load- or run-time relocation:
Reduces the size of an Extended Common Object File Format (XCOFF) object file by removing information used by the binder and symbolic debug program.
The binder uses the relocation information to modify address constants and other relocatable values when individual XCOFF object files are linked to create an XCOFF executable file.2
The binder appears to play a role similar to that of the link editor ld
on Linux systems.
See the description of the -x
flag:
Removes the symbol table information but does not remove static or external symbol information. The -x flag also removes relocation information, therefore linking to the file would not be possible.
How to Write Shared Libraries
Relocation Information for XCOFF File (reloc.h)