Re: calling from one libfoo.a to another

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

 



My coworker said he tried an example similar to mine on gcc 3.x and
the weak reference remains uninitialized, if it is defined in another
library.  On the other hand, if it is defined in the main compilation
unit (.o), the weak reference is resolved properly.

Our example couldn't be fixed by using ordinary externs and ordering
the libraries properly when linking because we have inadvertently
introduced a circular dependency; we are modifying libc to call
another library, which itself uses a bunch of libc functions.  Yeah,
yuck.

Our best guess at this point is that the weak attribute was not fully
polished in gcc 3.x, but works on 4.x.  It appears that we've found
a work-around involving a function pointer we initialize at run-time.
-- 
A Weapon of Mass Construction
My emails do not have attachments; it's a digital signature that your mail
program doesn't understand. | http://www.subspacefield.org/~travis/ 
If you are a spammer, please email john@xxxxxxxxxxxxxxxxx to get blacklisted.

Attachment: pgpui5C5M32jH.pgp
Description: PGP signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux