How LINK Orders and Combine Segments

ID Number: Q31991

3.x 4.x 5.0x 5.10 5.11 5.13 5.15 | 5.0x 5.10 5.11 5.13 5.15

MS-DOS | OS/2

Summary:

Every segment belongs to a named class such as 'CODE', 'DATA', or

'BSS'. LINK orders all segments with the same class name contiguously.

Within each class, segments are placed in the same order as LINK

encounters them. Segment classes are placed in the order they appear.

If you do not give a class name when you define a segment in assembly,

the segment gets the null class, which is treated like any other

segment. If the /DOSSEG option is given, or one of the Microsoft

language run-time libraries is used, LINK imposes the following

additional order:

code - class ending in 'CODE')

far data - everything but DGROUP and 'CODE')

DGROUP - the default data segment

class 'BEGDATA' (special runtime segment)

near initialized data (everything but 'BSS' and 'STACK')

near BSS--uninitialized data (class 'BSS')

stack

Additional reference words: 3.0 3.00 3.01 3.02 3.04 3.05 3.06 3.51

3.55 3.6 3.60 3.61 3.64 3.65 3.69 4.06 4.07 4.1 4.10 5.01.20 5.01.21

5.02 5.03 5.05 5.1 5.10 5.11 5.13 5.15