This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: So confused


Toshi,

Ok, I have done as you suggested.  I have build a header file to generate an
inline trap for every PalmOs function call.

Now my object file contains my code with the PalmOs functions inlined and
trapped.  It also contains unused code for every other PalmoOs function that
I am not directly using.

So my next question is:  does gcc already contain a mechanism to tell it not
to output unused code, does a patch already exists to add this
functionality, or Am I going  to have to write a patch to do this?  At which
point would it be easier to update the gcc 2.95.x PalmOs patch to gcc 3.x..
since I would have something to work from?  Or would it be easier to write
the other patch?

There is one last thing I need to look at and that's if the gcc linker will
remove "extra, unused" code?


-----Original Message-----
From: tm_gccmail@kloo.net [mailto:tm_gccmail@kloo.net]
Sent: Monday, June 21, 2004 1:39 PM
To: Brett Beebe
Cc: gcc-patches@gcc.gnu.org
Subject: Re: So confused


On Mon, 21 Jun 2004, Brett Beebe wrote:

> Hello,
>
...
> I compiled a cross compiler for the m68k-elf target.  That was pretty easy
> once I found the proper information.  I then compiled a test program I had
> from gcc version 2.95 to see what real changes there was.  The biggest
> change was to call PalmOs functions requires a 'trap' instead of a 'bsr'.
>
> So right now I still have several options. I can modify gcc to produce a
> 'trap' instruction for calls to PalmOs or I can produce a PalmOs library,
> that would have all of the correct calls in it.  So, for whatever reason I
> decided to modify the gcc code.
...

Uhhh, this is your mistake.

You probably want to build a header file that generates an inline trap
instruction for every PalmOS function call. This way, you avoid modifying
the compiler.

Toshi





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]