build order of segments

OS/360, TSS/360, DECSystem-10, DECSystem-20, various PDP-11 compiler/linker
combinations, VAX/VMS, Unix, Macintosh, and various embedded systems under
Unix-based cross-compilers (the embedded systems let me do lots of fine
control, as long as I gave the segments different names, so we could pack
things onto physical EPROMs, but wouldn’t give placement control for
segments of the same name). Then under MS-DOS, Lattice, Zortech, Borland,
and Microsoft, and a short-lived Phoenix overlay linker; under Windows,
Borland and Microsoft. So I guess I have to agree with you that my
experience is rather limited. I’ve used less than two dozen linkers in my
career. But a lot more than the single one you think.

Not sure how I could have used VC prior to the late 1980s or DDK (32-bit)
prior to 1992.

All took custom linker scripts. Actually, since I was using linkers on a
variety of small computers since 1965, I could also say 44 years. But for
the first few years, I didn’t care overly much about physical layout of
sections of the same name, or load order.
joe

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Friday, January 09, 2009 12:57 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] build order of segments

Don,

Every linker I have ever encountered in the last 35 years working on
computers links segments in the order it encounters them in files.

This is because in the last 35 years working on computers you, apparently,
just haven’t used a decent linker, and, instead, stuck to VC/DDK/etc.
Otherwise, the above statement applies only as long as a linker does not get
a command-line argument that tells it to parse a custom linker script, in
which you can specify the layout of your program in any way you wish - you
can specify not only the order that sections appear in executable file, but
their file offsets and virtual addresses they get loaded to as well…

Anton Bassov


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

Joe,

So I guess I have to agree with you that my experience is rather limited. I’ve used less than
two dozen linkers in my career. But a lot more than the single one you think.

Actually, the statement about pre-defined link order was made by Don, so that I was replying to his post.
Therefore, I really have no idea how my post may be possibly related to your experience with linkers…

All took custom linker scripts.

BTW, IIRC, MSFT-produced linkers don’t support actual linker scripts, and expose the comparable functionality via a set of predefined command-line linker directives, but never mind…

Anton Bassov