libstdc++ licensing
libstdc++ licensing
Posted May 10, 2013 15:08 UTC (Fri) by nix (subscriber, #2304)In reply to: libstdc++ licensing by mathstuf
Parent article: Stallman: The W3C's Soul at Stake
Every library glibc loads can have a unique order in which it searches libraries for symbol (it calls these 'search scopes'). By default, for compatibility with projects that started out using .a libraries, all libraries use the same search scope, and symbols named in earlier-loaded libraries interpose the same symbols used later, even in calls within the library. But declaring symbols hidden avoids this for those symbols; linking with -Bsymbolic or -Bsymbolic-functions avoids it for all symbols in a given library for references within that library; using -Bgroup causes all lookups from within that library to be done only within that library and libraries within the group it is part of (defined via --start-group and --end-group); using dlmopen() causes the dlmopen()ed library to get an entire new namespace sharing no symbols with the old...
... there are lots of ways to get different namespaces. Some are poorly supported (e.g. dlmopen()/dlclose() pairs fail after 30-odd attempts on glibc as currently constituted, and there is a static limit of 16 namespaces at present), but the interfaces are there and it sort of works.
