Hi, On Mon, 13 Apr 2015, Thomas Preud'homme wrote:
> > exporting _all_ global symbols from an executable always, only symbols > > actually undefined in shared libs and provided by the executable are > > exported (included as defined in .dynsym). That's the purpose of > > bind_libs_dynsyms. > > It doesn't have to be undefined. I just did a test with ld and it > exports symbol form the program if it's present in a dynsym of any > library. Ah right, that's actually what makes more sense than just doing it for undef symbols. > > > That should only be necessary for tcc_run but that require changing > > > bind_libs_dynsyms (which requires changing anyway because of the bug > > > above). > > > > I don't see that. Also undefined references from shared libs should only > > be satisfied by the executable if they are mentioned directly on the > > command line I think. > > Nope. Try it for yourself: Huh, indeed. IMHO that's inconsistent with the symbol resolution behaviour of GNU ld (only looking in level0 libs for symbols, not in those DT_NEEDED by them, unless --copy-dt-needed-entries is active), but so be it. > Thanks for teaching me, I really appreciate. It seems that despite what > you told, you understand tcc's linker at least as well as me. Anyway, if > you don't mind I'd still like to be the one to improve its organisation. > I'll appreciate any review of my changes though. Sure, no problem. Ciao, Michael. _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
