public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
From: Harry Kalogirou <harkal@gmx.net>
To: Linux-8086 <linux-8086@vger.kernel.org>
Subject: ELKS executable, time for a change?
Date: 28 Oct 2002 14:14:11 +0200	[thread overview]
Message-ID: <1035807219.5492.84.camel@cool> (raw)

Hi all,

 Lately I desided that the fact that processes come with a fixed data
segment, is quite restrictive. So I tried to solve that. I studied the
work that Al did on this before and came to the conclution that indeed
the only memory setup that will allow us to expand the data segment is
this (from the Documentation/text/bin-formats.txt) :

+-----------------+------------+----------------+
|    | <--- stack | data + bss |  heap ---> |   | < current->t_endseg
+-----------------+------------+----------------+
^                        ^                  ^
0x0            current->t_enddata        current->t_endbrk

This is mainly because bcc assumes ds == ss. So we can't move the stack
at the end of the data segment everytime sys_brk() instructs us to
enlarge it.

It is obvious that with this setup we will have a freely expandable
heap, while the stack will be fixed. So :

1) We need the linker to define the stack space at compile time.
2) Since ds==ss, the linker whould create executable with the data
segment pointers offseted by the stack size.

As Al says in the bin-formats.txt file, we can use the -D linker option 
to give the data offset. The main problem now if that we can't tell if
and how much offset an executable has, or equaly what stack the
executable needs.

We probably need to change the linker to produce a new executable
format, a custom format for ELKS. What are your thoughts on this?

Also I would like to ask Al if he can explain how was he planning to
support an enlarging stack? This is mentioned in mm/malloc.c. I
personaly don't see a way for this to happen. Am I missing something?

Harry




             reply	other threads:[~2002-10-28 12:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-28 12:14 Harry Kalogirou [this message]
2002-10-28 13:08 ` ELKS executable, time for a change? Alan Cox
2002-10-28 18:52   ` Harry Kalogirou
     [not found] ` <20021028121918.GA29181@pulsion.ecs.soton.ac.uk>
2002-10-28 18:52   ` Harry Kalogirou
  -- strict thread matches above, loose matches on Subject: below --
2002-10-28 18:51 Harry Kalogirou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1035807219.5492.84.camel@cool \
    --to=harkal@gmx.net \
    --cc=linux-8086@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox