[gccsdk] Problems running C++ programs compiled with GCC4

John Tytgat John.Tytgat at aaug.net
Wed Jul 30 13:58:55 PDT 2008


In message <4890CC8E.7060903 at sky.com>
          Lee Noar <leenoar at sky.com> wrote:

> AFAICT, ".weakref sym1, sym2" means resolve to sym2 (if available) else 
> zero. Using "nm -n" on the binary lists pthread_once as a weak undefined 
> symbol, so the linker isn't pulling in the definition, pthread_once 
> isn't available and the weakref resolves to NULL.

It could be a library order issue in the linker line.  I.e. UnixLib
coming before libstdc++.  When pthread_once has been pulled in before,
libstdc++ won't pull it because of this weak ref.

John.
-- 
John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven




More information about the gcc mailing list