symbol resolution

Jason Merrill jason_merrill at redhat.com
Fri Apr 6 16:35:33 UTC 2001


Currently, RTTI matching depends on address comparison.  This requires that
duplicate copies of the mangled name NTBS be combined, both within a shared
object (via comdat) and between them (via the usual symbol resolution
rules).

But the usual symbol resolution rules don't always apply to shared objects;
apart from things like -B symbolic which specifically override them,
the normal behavior of dlopen does not make symbols in the loaded object
available to subsequently loaded libraries.  This means that if a
particular typeinfo is defined in multiple dynamically loaded objects but
not in the main executable, the definitions will not be combined properly,
and comparison will produce false negatives.

Furthermore, the decision to rely on sharing between objects means that
static references to typeinfos, whether from the EH tables or other
typeinfos, require runtime dynamic relocations.  If you might be referring
to something in another object, there's no game you can play with reloc
types to avoid this.

I believe it is feasible to reconsider this now, since Intel has had
questions about how to represent these references.

Thoughts?

Jason




More information about the cxx-abi-dev mailing list