On 19/10/2017 16:06, Jeffrey Walton wrote: > On Thu, Oct 19, 2017 at 8:54 AM, Mason <slash.tmp@xxxxxxx> wrote: > >> On 19/10/2017 11:47, sugar wrote: >> >>> /usr/gcc/4.5/lib/gcc/i386-pc-solaris2.11/4.5.2/collect2 [...] >>> ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.2458 >>> ld: fatal: bad section layout: .SUNW_ldynsym must precede and be adjacent to .dynsym >>> collect2: ld returned 1 exit status >> >> It seems that the (Solaris) linker doesn't like what the >> (GNU) assembler produced. >> >> What is the output of >> /usr/gcc/4.5/lib/gcc/i386-pc-solaris2.11/4.5.2/collect2 -v > > $ /usr/gcc/4.8/lib/gcc/i386-pc-solaris2.11/4.8.2/collect2 -v > collect2 version 4.8.2 > /usr/bin/ld -v > ld: fatal: unrecognized option '-v' > ld: fatal: use the '-z help' option for usage information > collect2: error: ld returned 1 exit status > > $ /usr/gcc/4.8/lib/gcc/i386-pc-solaris2.11/4.8.2/collect2 --version > collect2 version 4.8.2 > /usr/bin/ld --version > ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.2458 OK, so it has been established that /usr/bin/ld is the Solaris linker, not the GNU linker. And apparently, this version of GCC has been built using --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/usr/gnu/bin/as Who built that toolchain? Maybe they can solve this mess, if they consider /usr/bin/ld can cope with /usr/gnu/bin/as > However, > > $ /usr/gnu/bin/ld -v > GNU ld (GNU Binutils) 2.23.1 Could you try something similar to what Aldo tried: mv /usr/bin/ld /usr/bin/ld-non-gnu ln -sv /usr/gnu/bin/ld /usr/bin/ld I.e. go behind the system's back to use the GNU linker. What happens then? Regards.