On Thu, 2010-02-11 at 11:58 -0800, Roland McGrath wrote: > > Note that _libraries_ generally do not have a problem building in a > > --no-add-needed world. ELF does not require that all references in a > > DSO be resolvable at ld time, and this linking change does not change > > that. If your library libfoo uses symbols from libbar but does not > > itself link against libbar, that's still legal (although probably > > impolite). > > It is ill-advised. It's recommended to use -shared -Wl,-z,defs so that you > will get a link-time failure for being sloppy in this way. (You can't do > this if the DSO intentionally has free undefined symbols as part of its > ABI, but that is not a style we would recommend for any new libraries.) > The reason this really matters is that you want to get symbol version > bindings for the references from your DSO to another DSO. It's also the > most reliable way (the implicit way) to make sure you have rpm dependencies > for the libraries you require. I meant "legal" in the sense of "it'll work", not "you should do it", but yes. I would care a lot more about the symbol versioning thing if symbol versions were something you could do without asm statements or linker scripts. Something like __attribute__((version_id)) would be perfect; shame it only works on HPUX on ia64. - ajax
Attachment:
signature.asc
Description: This is a digitally signed message part
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel