https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096
--- Comment #4 from Andrew Paprocki <andrew at ishiboo dot com> --- This occurs while building a project that depends on the protobuf library. I'll attach main.cc.s, and command lines are below. If I take the exact main.cc.o compilation line and simply swap out GCC 8.2.0 for g++-7, g++-6, g++-5, both GCC 7.3.0 & GCC 6.4.0 fail in the same manner, but GCC 5.5.0 succeeds. This is how main.cc.o is compiled: g++-8 -maix64 -pthread -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_PTHREAD -DHAVE_ZLIB -D_LIBCXXABI_FUNC_VIS="" -I/path/to/third_party/protobuf/cmake -I/path/to/third_party/protobuf/src -D__STDC_FORMAT_MACROS -O2 -g -DNDEBUG -std=c++11 -o CMakeFiles/protoc.dir/__/src/google/protobuf/compiler/main.cc.o -c /path/to/third_party/protobuf/src/google/protobuf/compiler/main.cc ... verbose output shows cc1plus invocation: cc1plus -quiet -v -I /path/to/third_party/protobuf/cmake -I /path/to/third_party/protobuf/src -imultilib pthread/ppc64 -iprefix /path/to/gcc/bin/../lib/gcc/powerpc-ibm-aix7.1.0.0/8.2.0/ -D_ALL_SOURCE -D__COMPATMATH__ -D__64BIT__ -D_THREAD_SAFE -D GOOGLE_PROTOBUF_CMAKE_BUILD -D HAVE_PTHREAD -D HAVE_ZLIB -D _LIBCXXABI_FUNC_VIS= -D __STDC_FORMAT_MACROS -D NDEBUG /path/to/third_party/protobuf/src/google/protobuf/compiler/main.cc -quiet -dumpbase main.cc -maix64 -auxbase-strip CMakeFiles/protoc.dir/__/src/google/protobuf/compiler/main.cc.o -g -O2 -std=c++11 -version -o /tmp/ccVqNDE3.s ... verbose output shows as invocation: as -u -a64 -mppc64 -many -o CMakeFiles/protoc.dir/__/src/google/protobuf/compiler/main.cc.o /tmp/ccVqNDE3.s This is how the build is attempting to link main.cc.o into a binary: g++-8 -maix64 -pthread -D__STDC_FORMAT_MACROS -O2 -g -DNDEBUG -Wl,-bnoipath -Wl,-brtl -Wl,-bbigtoc -Wl,-bexpall CMakeFiles/protoc.dir/__/src/google/protobuf/compiler/main.cc.o -o protoc-3.6.1 -Wl,-blibpath:/path/to/lib64:/usr/lib:/lib libprotobuf.a libprotoc.a libprotobuf.a /path/to/lib64/libz.so Result of running verbose output on the link: COLLECT_GCC_OPTIONS='-maix64' '-pthread' '-D' '__STDC_FORMAT_MACROS' '-O2' '-g' '-D' 'NDEBUG' '-o' 'protoc-3.6.1' '-v' '-shared-libgcc' /path/to/gcc/bin/../libexec/gcc/powerpc-ibm-aix7.1.0.0/8.2.0/collect2 -bpT:0x10000000 -bpD:0x20000000 -btextro -b64 -L/path/to/lib64 -brtl -R /path/to/lib64 -bsvr4 -o protoc-3.6.1 /lib/crt0_64.o /path/to/gcc/bin/../lib/gcc/powerpc-ibm-aix7.1.0.0/8.2.0/pthread/ppc64/crtcxa.o /path/to/gcc/bin/../lib/gcc/powerpc-ibm-aix7.1.0.0/8.2.0/pthread/ppc64/crtdbase.o -L/path/to/gcc/lib/pthread/ppc64 -R /path/to/gcc/lib/pthread/ppc64 -L/path/to/gcc/bin/../lib/gcc/powerpc-ibm-aix7.1.0.0/8.2.0/pthread/ppc64 -L/path/to/gcc/bin/../lib/gcc/powerpc-ibm-aix7.1.0.0/8.2.0/../../../pthread/ppc64 -L/path/to/gcc/bin/../lib/gcc/powerpc-ibm-aix7.1.0.0/8.2.0 -L/path/to/gcc/bin/../lib/gcc -L/path/to/gcc/bin/../lib/gcc/powerpc-ibm-aix7.1.0.0/8.2.0/../../.. -bnoipath -brtl -bbigtoc -bexpall CMakeFiles/protoc.dir/__/src/google/protobuf/compiler/main.cc.o -blibpath:/path/to/lib64:/usr/lib:/lib libprotobuf.a libprotoc.a libprotobuf.a /path/to/lib64/libz.so -lstdc++ -lm -lgcc_s /path/to/gcc/bin/../lib/gcc/powerpc-ibm-aix7.1.0.0/8.2.0/pthread/ppc64/libgcc.a -lpthreads -lc -lgcc_s /path/to/gcc/bin/../lib/gcc/powerpc-ibm-aix7.1.0.0/8.2.0/pthread/ppc64/libgcc.a -brtl -R /path/to/lib64 ld: 0711-308 SEVERE ERROR: Object CMakeFiles/protoc.dir/__/src/google/protobuf/compiler/main.cc.o, csect <_main.ro_> The csect is part of the .text section. collect2: error: ld returned 12 exit status