https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17480
Lőrinczy Zsigmond <lzsiga at axelero dot hu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lzsiga at axelero dot hu --- Comment #5 from Lőrinczy Zsigmond <lzsiga at axelero dot hu> --- This bug is still present in 4.6.4, it prevented me from building mysql-5.5.38: collect2 decided to include constructors from elements of a '*.a' archive that were not required by the current executable to link -- and in the second link-pass the unresolved externals of these 'parasite' objects stopped the linking with error. Before finding this bug, I've documented this problem here: http://www.linuxquestions.org/questions/aix-43/overly-zealous-collect2-on-aix-4175519409/ I think collect2 should do what its documentation says it should do: examine the result of the first linking, and collect the constructors/destructors from the objects 'ld' actually linked in.