[net.micro.pc] load ordering, LINK and the assmebler

markz@microsoft.UUCP (Mark Zbikowski) (01/09/84)

The anomalies in segment ordering of output from the assembler is due to
an unfortunate bug in the assmebler.  For 'compatability' reasons, IBM
has declined to ask for a fix to the problem:

	Instead of emitting the segments in the order declared, the assembler
	emits them during a walk of the symbol table.  Hence they are in
	alphabetical order.

There are many ways to get around this problem.  The most general purpose is
to write several small .asm files that declare a single segment only.  Then,
order these files appropriately and include them in your link script before
your other object files.  I know that this is bogus, but it is the user
community that needs to put pressure on IBM to ask for a remedy for this
bogosity.

The linker views the input not as a sequence of files, but as a stream of
segment declarations.  The exact methods that the linker uses for determining
segment ordering are as follows:

	Segments with the same name (classname and segmentname) with public
	attribute are combined.

	The output ordering of classes is the same as the ordering of the
	initial occurrence of each class on input.

	The output ordering of segments within a class is the same as the
	ordering of the initial occurrence of each class on input.