9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Steve Simon" <steve.simon@snellwilcox.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] arm compiler info
Date: Thu,  6 May 2004 13:24:59 +0100	[thread overview]
Message-ID: <dbe48f0ee189e986210d9f2dbe888631@snellwilcox.com> (raw)
In-Reply-To: <59a028e5e416c7482661502ee195ddf5@terzarima.net>

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]

some more detail:

Embedded APM system.

We have a kernel with a flash file system and serial console,
user programs (ls, cp, mv, The-big-app) are run from flash.

We don't program the MMU except to configure memory to be flat.

All user programs are relocated on load, under GCC the elf file contains
special global offset table sections which must be fixed-up, GreenHills
actually compiles code into crt0 to do this in every executable. Data is
referenced via a single register that contains the offset of the start of data.

User progs get access to kernel resources vla a jump table they are passed
on the stack when they start.

What I am really after is a nicer enviroment to work under than XP and
Greenhills (GCC helps but still ties me to MSDOS).

However my major concern is how much time I might spend getting this working,
if its a few days then no problem...

I guess I need to start looking at 5l, or understanding the MMU properly
so all programs can run at the same virtual address.

-Steve

[-- Attachment #2: Type: message/rfc822, Size: 3157 bytes --]

From: Charles Forsyth <forsyth@terzarima.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] arm compiler info
Date: Thu, 6 May 2004 11:29:37 +0100
Message-ID: <59a028e5e416c7482661502ee195ddf5@terzarima.net>

>>it isn't hard to get ELF output, both vl and el have
>>a flag for it so changing 5l is a snarf/paste or too.

or it would be if the elf weren't demented.
one of those scary ones.

5c/5l code will run on arm 9 (there are possibly some
extensions in arm 9, and if so, they won't use them,
though even that is usually easily dealt with).

possibly the bigger complication is the extent to
which the output is PIC enough (or can easily be
made so) for this application.  i remember looking
at an ARM application note about that but just
remember my resulting dismay, not what caused it.
it might not have been the PIC conventions as
such but its interaction with something else.

as to that ELF, is the loading program expecting
a completely linked program or something that
is then linked dynamically into one already running?
if the former, the existing ELF-header producing
code might well suffice (with the usual changes
to account for dementia, hence some of the "??"
in comments in existing code); if the latter, you'd need
to convert the symbols as well, and perhaps capture
and convert data for relocation (which isn't normally
produced except for dynamically-loaded modules).
i'm assuming you're safe from the elf's mate, a sly dwarf.

      reply	other threads:[~2004-05-06 12:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-05 10:45 Steve Simon
2004-05-05 13:51 ` Bruce Ellis
2004-05-05 14:04   ` Steve Simon
2004-05-05 19:25     ` boyd, rounin
2004-05-06 10:05   ` [9fans] acme Zerox: Get lost Charles Forsyth
2004-05-07  0:02     ` Rob Pike
2004-05-06 10:29   ` [9fans] arm compiler info Charles Forsyth
2004-05-06 12:24     ` Steve Simon [this message]

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=dbe48f0ee189e986210d9f2dbe888631@snellwilcox.com \
    --to=steve.simon@snellwilcox.com \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).