http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375
--- Comment #83 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-04-11 18:44:07 UTC --- > I am not sure if this is GCC bug or elfhack, but I would guess for elfhack actually. I guess you're right, because when I move the swap definitions: template <class endian, typename R, typename T> inline void Elf_Ehdr_Traits::swap(T &t, R &r) ... from elf.cpp to elfxx.h (where they actually belong) the link error vanishes.