This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


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

[ECOS] ecosSWtools problems


Hi,

This posting does not concern ecos directly but it may help some ecos
users, so ...

1. When linking code with PC REL24 branches, the ARM bfd linker does not
   complain nor modify the branch instruction when the offset overflows,
   it just generates code that branch anywhere. The attached patch
   should fix this problem.

2. The '--gc-sections' linker flag causes the linker to discard
   referenced code.  For instance:

        class A { public: virtual void f(int) = 0; };

        class B : public A { public: void f(int); };

        void B::f(int) { ...  }

        A &a = make_B_instance();

        a.f();

   In this case, the linker garbage-collects B's vtable entry for 'f()'
   and then discard B::f(). The assembler code gcc produces, in
   particular '.vtable_inherit #__vt_1B, #0', implies that the linker
   will neither propagate the mark of A::f() to B::f(), nor will it use
   shared vtable marks.

   But when B inherits virtually from A, then gcc generates a
   '.vtable_inherit #__vt_1B, #__vt_1A'.

   I tried this with the 'ecosSWtools-arm-990321' and with
   gcc-2.95. Both result in the same problem.

   Now, my questions:
    - did I miss something?
    - if not then I think that gcc is the culprit since
      '.vtable_inherit' does not have anything to do with virtual
      inheritance, right?

Thanks,

Robin
-- 
Robin Farine
ACN Advanced Communications Networks SA   Tel: +41 32 724 74 34
Rue du Puits-Godet 8a                     FAX: +41 32 724 74 54
CH-2000 Neuchâtel                      e-mail: robin.farine@terminus.org

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