Hi Daniel,
thanks to your (admittedly) simple test case I could reproduce and research into the issue (summary follows), which has nothing to do with linking order as I guessed:
First, the 'stderr' symbol is private to the cxx library. This is by intention, as we do not provide a POSIX environment with the Genode base system, but have to make the G++ support library - libsupc++ - happy.
Since 11.08, the dynamic linker does not export all symbols of any library it is linked to to prevent some issues we had during development. It rather uses a whitelist of global symbols that will be exported in os/src/lib/ldso/symbol.map. Any other symbol will become local.
Also, as I stated in the last email libstdc++ seems to include all objects from libsupc++, effectively providing the same symbols but not localized. Therefore, the linker does not nag about undefined (localized) symbols from libsupc++(vterminate.o), but about the consequential error of a missing 'stderr' needed by libstdc++(vterminate.o).
The attached patch fixes the problem but is not approved by our dynamic-linking specialist. As soon as he gives his nod, we'll commit a solution into the public SVN and notify this list.
Regards