🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #46502

Re: gasp dislike of ORG

#46502
From: John E. Clark
Date: Thu, 10 Nov 1994 17:38
46 lines
2395 bytes
In article <1994Nov4.083731.461@caren.demon.co.uk> loris@caren.demon.co.uk (Loris Caren) writes:
+Can anybody tell me why the gnu as pre-processor GASP has been programmed 
+to reject .ORG statements?

Possibly because a.out doesn't support a good method of moving the
'origin' of either a segment, or in some ways the entire link file. 

For the traditional valued a.out, there's only TEXT, DATA, and BSS,
for which a base origin can be set at link time.

I think 'coff' has the idea of segments, hence it would be possibly
for each segment to have an 'origin'.

Without the idea of a segment, the 'raw' a.out would have to zero
pad between 'segment' spaces, which of course would quickly become
unusable for widely separated segments.

for example,

	.text
	.psect ROM_text
	.org 0xFF000000 ; I want my 'rom' segment high.

	......

	.psect RAM_text	; I want my 'ram' segment low.
	.org 0x1000
	....

	.end


Traditional a.out could not do this except by filling in about
a 4 gigabytes of zeros.

The traditional approach would have to separate program packages
that would contain the respective code segments.

In 'un*x' segments in some way make little sense, but for the
embedded systems programer, the lack of 'segmentation' at the
programing level is a major hinderance.

My approach has been to mostly copy 'rom' to 'ram', and execute
out of ram alone and only sliding the TEXT, DATA, and BSS around
if necessary, or use 'absolute' references for pointers (as in
PTR = 0xFF000000).
Technical Details
Message-ID: <39tlq3$201@news.cerf.net>
Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!news.edu.tw!rs540.ncu.edu.tw!news.cc.nctu.edu.tw!nctuccca.edu.tw!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!zip.eecs.umich.edu!yeshua.marcam.com!news.mathworks.com!uhog.mit.edu!news.mtholyoke.edu!nntp.et.byu.edu!netline-fddi.jpl.nasa.gov!nntp-server.caltech.edu!news.cerf.net!nic.cerf.net!synergy
References: <1994Nov4.083731.461@caren.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,d8d024e8fbcfbdd8
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1994-11-10 09:38:11 PST
Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!news.edu.tw!rs540.ncu.edu.tw!news.cc.nctu.edu.tw!nctuccca.edu.tw!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!zip.eecs.umich.edu!yeshua.marcam.com!news.mathworks.com!uhog.mit.edu!news.mtholyoke.edu!nntp.et.byu.edu!netline-fddi.jpl.nasa.gov!nntp-server.caltech.edu!news.cerf.net!nic.cerf.net!synergy
From: synergy@nic.cerf.net (John E. Clark)
Newsgroups: gnu.gcc.help
Subject: Re: gasp dislike of ORG
Date: 10 Nov 1994 17:38:11 GMT
Organization: CERFnet Dial n' CERF Customer
Lines: 48
Message-ID: <39tlq3$201@news.cerf.net>
References: <1994Nov4.083731.461@caren.demon.co.uk>
NNTP-Posting-Host: nic.cerf.net
Keywords: gasp, as, gas