Article View: gnu.gcc.help
Article #41422Re: HELP: romable GCC cpp assembler output
From: Barnacle Wes
Date: Wed, 27 Mar 1996 00:00
Date: Wed, 27 Mar 1996 00:00
52 lines
2746 bytes
2746 bytes
David Wood wrote:
>
> Hi all
>
> Does anyone know where i can find details of what is romable and what is
> not with GCC's CPP compiling.
>
> I have had a quick look at the assembler output, but without doing an
> exhaust test, i do not how much is romable.
>
> For instance, the compiler generates what look like vtable definitions
> for a class with some member pointers in them. What does the compiler do
> generally. If i new an object does it make a copy of this vtable. Also
> the size that is allocated is different from the size of the vtable.
> Does it make a copy of part of the table, keep a pointer, etc....
>
> Is there something i can read on this - any pointers anyone please.
>
> As this is destined for an embedded system, i'd like to know what
> assembler is produced so i can get my system right.
>
> Target = 386, Host = DOS
>
> (I also need the COFF file format so i can produce a loader!!)
I use GCC for an embedded system at work, so hopefully I can help
with a few of your questions.
The output produced by GCC typically has the traditional three UNIX
segments: code, data, and bss. The code segment can be ROM'ed, it is
considered read-only. GCC is even smart enough to put literal char
strings in this segment, if you specify -fno-writable-strings.
If you want to create your own loader, you probably *don't* want to
use COFF output. You should read the GCC documentation about producing
a cross-compiler, and use a simple output format like a.out. If you
are using a commercial real-time OS, GCC may already have a target for
it. We use VxWorks and GCC configures and installs for VxWorks with
no problems on both HP-UX and FreeBSD.
For an assembler, the simplest path is to use the Gnu assembler,
commonly known as 'gas.' It is part of the 'binutils' package,
now at version 2.6.
Write back via e-mail if there is any additional help I can give.
Good luck!
--
Wes Peters | Yes I am a pirate, two hundred years too late
Softweyr | The cannons don't thunder, there's nothing to plunder
Consulting | I'm an over forty victim of fate...
wes@intele.net | Jimmy Buffett
Technical Details
Message-ID:
<315A28B8.41C67EA6@intele.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<217017907wnr@thermoteknix.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,9f5896e2c4fcf44c X-Google-Attributes: gid11318c,public From: Barnacle Wes <wes@intele.net> Subject: Re: HELP: romable GCC cpp assembler output Date: 1996/03/27 Message-ID: <315A28B8.41C67EA6@intele.net> X-Deja-AN: 144617417 references: <217017907wnr@thermoteknix.co.uk> to: david@thermoteknix.co.uk content-type: text/plain; charset=us-ascii organization: The briney, briney deep mime-version: 1.0 newsgroups: gnu.gcc.help x-mailer: Mozilla 2.01 (X11; I; FreeBSD 2.1.0-RELEASE i386)