public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@llwyncelyn.cymru>
To: Juan Perez-Sanchez <lithoxs@gmail.com>
Cc: linux-8086 <linux-8086@vger.kernel.org>
Subject: Re: New GCC compiler for 8086 cpu's
Date: Mon, 19 Jun 2017 14:43:00 +0100	[thread overview]
Message-ID: <20170619144300.2b171cbf@alans-desktop> (raw)
In-Reply-To: <CAD6VGubHHiXRYQQ=LKjtH2epvmvuy+Vrn+XRJ3h1_3_geuN=Rw@mail.gmail.com>

On Thu, 15 Jun 2017 17:53:20 -0500
Juan Perez-Sanchez <lithoxs@gmail.com> wrote:

> On Thu, Jun 15, 2017 at 5:19 AM, Edoardo <eddyx89@gmail.com> wrote:
> > How much smaller?  
> 
> The current kernel with a configuration similar to the default
> configuration for the 0.1.3 version,
> compiled with BCC has a code size of 51216 bytes. With the new
> compiler, size is 48288 bytes.
> This is 2928 bytes less (5.7%).
> 
> > If I remember correctly, one of ELKS limits was that binaries had to
> > fit on a 64KB page, and that was due to the compiler we used (dev86 /
> > bcc).  
> 
> Actually, code size <=  64KB and separately  (data + bss + stack sizes) <= 64KB.
> 
> > Do you think/know if GCC may solve this limit, being able to produce
> > multi-page binaries?  
> 
> No, those limits still holds.

For the kernel it's good enough it could do it with a few helpers.
However the big kernel problem space is data (because of the stacks).

If an 'export symbol' thing is added and drivers are treated like kernel
modules (even if loaded together not on demand) then you can use tools to
generate stubs for each module that do a far call into the kernel. You
would probably need to disallow callbacks and modules calling each other
because while you are sort of doing a far call you need a near call
frame. Also because you'd have pointers to functions in other modules
that were not far and did not a segment attached.

Actually making it work is tricky but doable. I don't think it's needed
however - the data segment is the only really big issue.

Alan

  parent reply	other threads:[~2017-06-19 13:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14  0:08 New GCC compiler for 8086 cpu's Juan Perez-Sanchez
2017-06-14  6:47 ` Tom
2017-06-14 19:53   ` Juan Perez-Sanchez
2017-06-15 10:19 ` Edoardo
2017-06-15 22:53   ` Juan Perez-Sanchez
2017-06-16 13:33     ` David O'Shea
2017-06-16 18:57       ` Juan Perez-Sanchez
2017-06-19  3:58         ` David O'Shea
2017-06-19  6:58           ` Georg Potthast
2017-06-19  9:15             ` David O'Shea
2017-06-19 19:36           ` Juan Perez-Sanchez
2017-06-19 13:16       ` Alan Cox
2017-06-19 13:43     ` Alan Cox [this message]
2017-06-19 19:57       ` Juan Perez-Sanchez
2017-06-19 20:55         ` Alan Cox
2017-06-19 22:53           ` Juan Perez-Sanchez
2017-06-20 11:37             ` Alan Cox
2017-06-20 21:57               ` Juan Perez-Sanchez
     [not found]                 ` <CALgV52iFRay4y8dYrP0ZGnF2JQJi2h7c=QnSsDniv72azmFPbA@mail.gmail.com>
2017-06-20 22:46                   ` Fwd: " David Given

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=20170619144300.2b171cbf@alans-desktop \
    --to=alan@llwyncelyn.cymru \
    --cc=linux-8086@vger.kernel.org \
    --cc=lithoxs@gmail.com \
    /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