Dave Carrigan <[EMAIL PROTECTED]> wrote:
> I'm using the CVS version of prc-tools from Dec 19, 2001 to develop a
> C++ application.
[...]
> I have one function that I cannot put into a different section. If I do,
> I get all the classic symptoms one would expect when the caller's idea
> of the section doesn't match the actual section [...]
> The function in question is a static class method, so I *know* that I've
> only declared the function's section in one place. Furthermore, after
> disassembling the code,

I can't reproduce your problem with a trivial class with a static member
function like this:

        class C {
        public:
          static int foo () __attribute__ ((section ("fred")));
          };

Is there perhaps some inlining going on?

If you have a test case you can send me, I'll try to do better than just
grasping at straws like this.  :-)

> I'm pretty sure that that the caller has it
> right, and thinks that the function is in the "misc" section where it
> was declared. I don't really know m68k assembler, but that's what the
> following code suggests to me:
[...]
>     70a:       206d 0000       moveal %a5@(0),%a0
>                        70c: END16      __text__misc
>     70e:       d1fc 0000 0000  addal #0,%a0
>                        710: 32 Util::open_bookdb(unsigned short)
>     714:       4e90            jsr %a0@

Yes indeed, that's an inter-section call to the "misc" section.

> Plus, it [the main code section] has 8KB from
> libcrt with what looks like exception and rtti support (btw, why is
> that, when I compile with -fno-exceptions and -fno-rtti and link with
> -lnoexcept?).

I fixed a bug in libnoexcept.a on 2001-10-16; previously overrides for
operator new[] were missing, and exception and rtti support could be
pulled in if you used those operators.  You should have this fix with
your December CVS build, but it's worth checking (look for vnew.o and
vnewnt.o in libnoexcept.a).  There's a fixed copy of the library at

        http://prc-tools.sourceforge.net/misc/

Otherwise, nothing leaps to mind from this distance.

    John

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to