Developments - ELF and others

Peter Naulls peter at
Thu Oct 2 11:26:57 PDT 2003

Following a lively debate on

I've started looking at adding ELF to GCCSDK.  I've already ported a
version of gas from binutils which seems to work fine.  Using it, I
compiled a C hello world to assembler in ARM Linux, assembled in RISC
OS, linked with Acorn link (which supports ELF), and ran with ELFLoader
(by John Bell).

I've also got a port of "ld", which seems to work, but getting anything
useful out of it involves having an ELF C library.

As an aside, and in parallel with this, I'm probably going to do
another release of my 32-bit GCCSDK, but this time with the Unixlib from
head CVS, which has various improvements over it.  This will be
partially to support these efforts.

There are various issues here of course - gas doesn't support the RISC
OS assembler format.  Adding ELF output to 'as' remains a possibility.
Equally, drlink doesn't support ELF, and we really want to have
interworking with AOF for lots of reasons, even if that results in
static code.  (I'm not really considering the shared library aspects
right now).

GCC's backend supports outputting GNU format assembler (notionally
"riscos-elf"), which I'm going to try compiling, and see how that goes.
Code from ARM Linux/NetBSD isn't entirely suitable, lacking chunked
stacks, and on non-Debian will have half-word loads.  Although it's not
like Unixlib didn't have a non-chunked stack for a long time :-) 

The upshot is that I may be able to shortly put together a full RISC OS
ELF toolchain, albeit with several limitations.

Comments appreciated, of course.

Peter Naulls - peter at        |
The RISC OS Browser Issue -

More information about the gcc mailing list