Related articles |
---|
The different groups and segments of object files johann@myrkraverk.com (Johann 'Myrkraverk' Oskarsson) (2020-06-19) |
Re: The different groups and segments of object files gah4@u.washington.edu (2020-06-19) |
Re: The different groups and segments of object files DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2020-06-20) |
Re: The different groups and segments of object files gah4@u.washington.edu (2020-06-21) |
Re: The different groups and segments of object files johann@myrkraverk.invalid (Johann 'Myrkraverk' Oskarsson) (2020-06-25) |
Re: The different groups and segments of object files johann@myrkraverk.invalid (Johann 'Myrkraverk' Oskarsson) (2020-06-25) |
Re: The different groups and segments of object files DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2020-06-25) |
Re: The different groups and segments of object files DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2020-06-25) |
Re: The different groups and segments of object files DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2020-06-26) |
Re: The different groups and segments of object files gah4@u.washington.edu (2020-07-02) |
From: | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
Newsgroups: | comp.compilers |
Date: | Thu, 25 Jun 2020 22:41:06 +0800 |
Organization: | Compilers Central |
References: | 20-06-004 20-06-005 |
Injection-Info: | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="43279"; mail-complaints-to="abuse@iecc.com" |
Keywords: | code, history, comment |
Posted-Date: | 25 Jun 2020 11:57:09 EDT |
In-Reply-To: | 20-06-005 |
Content-Language: | en-GB |
On 20/06/2020 5:12 am, gah4@u.washington.edu wrote:
> On Friday, June 19, 2020 at 8:33:34 AM UTC-7, Johann 'Myrkraverk' Oskarsson wrote:
>
>> The short story is that I've been playing with the OpenWatcom code
>> generator. I can use it to make a custom object file. The platform
>> is 32bit x86, though I'm happy to know how things work in 16bit and
>> 64bit modes as well.
>
>> The code generator has options I do not fully understand, and I do
>> not know where I can find information on this subject. To further
>> complicate matters I'm unsure what questions I should be asking.
>
> (snip)
>
> The Watcom (at least before OpenWatcom) compilers were the only ones
> I knew to generate large model (more than one segment) 32 bit code.
I'm told OpenWatcom still does this. One hobbyist operating system
effort is based on OW for this reason.
> It might be that OS/2 even knows how to load and run it.
> (I am pretty sure that Windows and Unix don't.)
>
> In that model, pointers are 48 bit, with a 16 bit segment selector
> and 32 bit offset. This would have been another way to get
> past the 32 bit barrier without going to 64 bit.
>
> Well, there is a reason not to do it, which is that processors don't
> have a segment descriptor cache. Every load of a segment selector
> requires a side load of the descriptor, so too much overhead.
>
> In any case, code that you expected to be only in the 16 bit section,
> related to segments, should be in there, also. As I noted, it is
> OS/2 where this could have been used, so it might only be in the OS/2
> object program format. I don't remember now how the OS/2 and Win32
> formats differ.
OS/2 still exists. It's being sold as a distro called ArcaOS. I
haven't tried this on ArcaOS either (though I have it).
> In 16 bit modes, you can have huge data, which allows for a multiple
> segment data object, with segment selectors spaced to allow for
> appropriate calculation. I believe this is only for dynamically
> allocated data, but it might also allow for static allocation
> in the object program. I tried to avoid that.
Can you please elaborate on what you tried to avoid? Or refer to a
reading material?
--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk
[On the 286 huge data was extremely slow since it required several
shifts and masks for every address reference. Re segments and segment
groups, the ones that survive are code (text), static R/W data, static
R/O data, and uninitialized data (bss). There's others for dynamic
linking and runtime symbol tables but they don't seem relevant here.
-John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.