bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ld bug - thumb code


From: andy parker
Subject: ld bug - thumb code
Date: Thu, 29 Aug 2002 16:52:16 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530

Hi folks,
I think there's a bug in the linker when building thumb code. I
have the following C++ multiple inheritance / virtual function test case :

class A
{
public:
      virtual void F();
};
class B
{
public:
      virtual void F();
};
class C : public A, public B
{
public:
      void F();
};

void A::F()
{
      cdbg() << "A: " << (int)this << "\n";
}
void B::F()
{
      cdbg() << "B: " << (int)this << "\n";
}
void C::F()
{
      cdbg() << "C: " << (int)this << "\n";
}

void Func(C *c)
{
      A * a = c;
      B * b = c;
      a->F();
      b->F();
      c->F();
}

int main(void*)
{
      C   c;
      Func(&c);
      return 0;
}

The link stage falls over with:

attempt to open a.o:src/a.cxx:6: relocation truncated to fit:
R_ARM_THM_PC11 C::F()

Any help greatly appreciated with this one. My tool chain is (linux pc
hosted):
binutils-2.13
newlib-1.10.0
gcc-3.2

Thanks,
Andy








reply via email to

[Prev in Thread] Current Thread [Next in Thread]