The greatest potential for loss of information occurs when there is the least overlap between the information provided by the source format, that stored by the canonical format, and that needed by the destination format. A brief description of the canonical form may help you understand which kinds of data you can count on preserving across conversions.
ZMAGIC
file would have both the demand pageable bit and the write protected
text bit set. The byte order of the target is stored on a per-file
basis, so that big- and little-endian object files may be used with one
another.
ld
can
operate on a collection of symbols of wildly different formats without
problems.
Normal global and simple local symbols are maintained on output, so an
output file (no matter its format) will retain symbols pointing to
functions and to global, static, and common variables. Some symbol
information is not worth retaining; in a.out
, type information is
stored in the symbol table as long symbol names. This information would
be useless to most COFF debuggers; the linker has command-line switches
to allow users to throw it away.
There is one word of type information within the symbol, so if the
format supports symbol type information within symbols (for example, COFF,
Oasys) and the type is simple enough to fit within one word
(nearly everything but aggregates), the information will be preserved.