On 16/11/16 18:43, Richard Sewards wrote: > Thanks, that's helpful. My GCC 5 is built to use binutils 2.25 and > gcc 6 uses binutils 2.27. Rebuilding gcc 6 to use 2.25 eliminates > the link errors, so gold 1.12 must differ from gold 1.11 somehow. I > don't see anything obvious in the Changelog or News files. > > I suppose the solution is to be more careful when creating libraries, > using -ldl and possibly --no-undefined. Is there something special > about -ldl? And are there accepted conventiosn for this now? Lots of things in software work by accident. In the past you might get libdl pulled in because of transitive dependencies. It's always been correct to use -ldl. Here's the man page: DLOPEN(3) Linux Programmer's Manual DLOPEN(3) NAME dladdr, dlclose, dlerror, dlopen, dlsym, dlvsym - programming interface to dynamic linking loader SYNOPSIS #include <dlfcn.h> void *dlopen(const char *filename, int flag); char *dlerror(void); void *dlsym(void *handle, const char *symbol); int dlclose(void *handle); Link with -ldl. Andrew.