Article View: comp.lang.asm.x86
Article #91Re: DOSSEG and TLINK
From: Bob Smith
Date: Sun, 16 May 1999 00:00
Date: Sun, 16 May 1999 00:00
103 lines
3885 bytes
3885 bytes
Good question! I traced through my linker (QLINK) to see why the segment order isn't what you think it should be and found an easily fixed bug which is also in MS Link (possibly for a different reason). Thanks for pointing it out. assassin17@rocketmail.com wrote: > > bsmith@sudleyplacedespam.com wrote: > > assassin17@rocketmail.com wrote: > [snip] > > > 1. All segments with a class name ending in CODE > > > 2. Far data segments (segments outside DGROUP) > > > 3. Near data (DGROUP) segments, in the following order: > > > a. Segments of class BEGDATA (reserved for Microsoft use) > > > b. Any segments not of class BEGDATA, BSS, or STACK > > > c. Segments of class BSS > > > d. Segments of class STACK > > > > > > however, TLINK seems to always put segments with class 'STACK' at > the > > > end, even if they're _not_ in DGROUP. MASM's LINK behaves according > to > > > the above list. is there any standard to how other linkers handle > > > DOSSEG, or can they arrange the different classed segments however > they > > > want? > > > > The standard is the set of rules you mentioned above. TLINK just > > doesn't observe them. > > thanks for the reply. heh, i guess this explains why TLINK 7.1.30.1 > just ignores DOSSEG.. > > > > ---------- > > > DOSSEG > > > > > > DGROUP GROUP OERP,AAAA,xaaa,LOPE,FBSS,DARK > > > > > > xaaa SEGMENT 'CODE' > > > xaaa ENDS > > > > > > CBF SEGMENT > > > CBF ENDS > > > > > > FBSS SEGMENT 'DATA' > > > FBSS ENDS > > > > > > LOSER SEGMENT 'STACK' > > > LOSER ENDS > > > > > > ztr SEGMENT 'DATA' > > > ztr ENDS > > > > > > aab SEGMENT 'BSS' > > > aab ENDS > > > > > > OERP SEGMENT 'BEGDATA' > > > OERP ENDS > > > > > > AAAA SEGMENT 'ARPA' > > > AAAA ENDS > > > > > > LOPE SEGMENT 'STACK' > > > LOPE ENDS > > > > > > ZZZU SEGMENT 'ARPA' > > > ZZZU ENDS > > > > > > DARK SEGMENT 'CODE' > > > DARK ENDS > > > > > > END > > > ----- > [snipped a lot] > > According to the rules, the correct order (for the original segments) > is > > as follows: > > > > Name Class Rule > > -------------------- > > xaaa CODE 1 > > DARK CODE 1 > > CBF 2 > > ztr DATA 2 > > LOSER STACK 2 > > aab BSS 2 > > ZZZU ARPA 2 > > OERP BEGDATA 3a > > FBSS DATA 3b > > AAAA ARPA 3b > > LOPE STACK 3d > > _________________________________________ > > ok, QLINK and M$ LINK both do it right then. hmm.. why does ztr end up > before LOSER, even thought it's after it in the source file? is it > because FBSS is in the same class as ztr, and it's before LOSER in the > code? _________________________________________ Bob Smith -- bsmith@sudleyplacedespam.com a.k.a. bsmith@qualitasdespam.com I've been getting a lot of junk e-mail lately, so to reply to me directly, delete "despam".
Technical Details
Message-ID:
<7hnfm3$i3u$1@autumn.news.rcn.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7hg7kq$ksb$1@autumn.news.rcn.net> <7hih7k$8vb$2@autumn.news.rcn.net> <7hnajq$jfn$1@autumn.news.rcn.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: feaef,dda8022d1c19bc63 X-Google-Attributes: gidfeaef,public X-Google-Thread: f7d8d,dda8022d1c19bc63 X-Google-Attributes: gidf7d8d,public X-Google-Thread: 114917,dda8022d1c19bc63 X-Google-Attributes: gid114917,public From: Bob Smith <jsmith98@frontiernet.net> Subject: Re: DOSSEG and TLINK Date: 1999/05/16 Message-ID: <7hnfm3$i3u$1@autumn.news.rcn.net> X-Deja-AN: 478601493 Content-Transfer-Encoding: 7bit Approved: <johnfine@erols.com> References: <7hg7kq$ksb$1@autumn.news.rcn.net> <7hih7k$8vb$2@autumn.news.rcn.net> <7hnajq$jfn$1@autumn.news.rcn.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Mozilla-Status: 0801 X-Complaints-To: abuse@rcn.com X-Trace: /FK6E8Dw4eEvfBXJ1hHYWP+ueb92kiOoZUOmrZSWI/w= Organization: Qualitas, Inc. Mime-Version: 1.0 Reply-To: bsmith@sudleyplacedespam.com NNTP-Posting-Date: 16 May 1999 22:09:07 GMT Newsgroups: comp.lang.asm.x86,borland.public.tasm,alt.lang.asm