[Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _.ro_ sections by default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096 Jeffrey A. Law changed: What|Removed |Added Target Milestone|8.5 |11.0 CC||law at redhat dot com
[Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _.ro_ sections by default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096 --- Comment #31 from David Edelsohn --- Just to be clear, the -brtl allows runtime overriding symbols. GCC is correctly placing some symbols that should not be overridden in the text section. To allow the runtime overriding, which is not needed for this application/library, one needs to instruct the AIX linker to make the text section read-write. All of these other changes in behavior are triggered by the need to use -R to specify runtime library search path.
[Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _.ro_ sections by default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096 --- Comment #30 from David Edelsohn --- Yes, I can reproduce the error, but it only occurs when -bsvr4 is used. Have you looked at what -bsvr4 enables in the ld man page? Not just the -R comment. -brtl -brtllib -bexpfull -R, instead of being ignored, takes one suboption that defines the runtime library search path It seems that you're utilizing the -bsvr4 option to change the behavior of -R without regard for the other effects of the option. And the other changes to the default behavior of the AIX are breaking the build. -bsvr4 tries to provide a lot of SVR4 behavior, but is too course and big a club. [ ] Instead of using -bsvr4, I strongly suggest that you adjust / adapt the Makefile of your project and use the AIX linker -blibpath command line option to set the runtime library search path. I realize that there is no other AIX linker option to change the behavior of just -R, but you incorrectly are blaming the compiler for an error elicited by other, documented effects of the -bsvr4 linker option. AIX is not Solaris or Linux. There is no magic command line option to make AIX pretend to be Linux. The failure is not caused by a GCC bug and it's not caused by an AIX linker bug. GCC is behaving as designed. AIX linker is behaving as designed and documented. The -bsvr4 option has too many other effects to be used solely to work around the -R option.
[Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _.ro_ sections by default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096 --- Comment #29 from Andrew Paprocki --- David, Using GCC 9.2.0 I can reproduce using the steps from comment 27. Did you run them yourself?
[Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _.ro_ sections by default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096 --- Comment #28 from David Edelsohn --- GCC 7 is no longer supported. The patch was backported and released in GCC 8.4 and GCC 9.1.
[Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _.ro_ sections by default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096 --- Comment #27 from Andrew Paprocki --- 60 second reproduction steps: $ curl -O https://ftp.pcre.org/pub/pcre/pcre-8.42.tar.gz $ tar zxvf pcre-8.42.tar.gz && cd pcre-8.42 $ CC="gcc-7" \ CXX="g++-7" \ CFLAGS="-maix32 -pthread" \ CXXFLAGS="-maix32 -pthread" \ LDFLAGS="-Wl,-bsvr4" \ ./configure && make -j It will fail: ld: 0711-308 SEVERE ERROR: Object pcre_stringpiece_unittest-pcre_stringpiece_unittest.o, csect <_pcrestringpieceunittest.ro_> The csect is part of the .text section. ld: 0711-308 SEVERE ERROR: Object pcre_scanner_unittest-pcre_scanner_unittest.o, csect <_pcrescannerunittest.ro_> The csect is part of the .text section. collect2: error: ld returned 12 exit status collect2: error: ld returned 12 exit status ld: 0711-308 SEVERE ERROR: Object pcrecpp_unittest-pcrecpp_unittest.o, csect <_pcrecppunittest.ro_> The csect is part of the .text section. collect2: error: ld returned 12 exit status
[Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _.ro_ sections by default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096 --- Comment #26 from Andrew Paprocki --- Just re-summarizing now for 2020 since there have been a few twists and turns and distractions. This issue has nothing to do with CMake, -brtl, or -bexpall linker flags. This issue only occurs when GCC is told to pass the -bsvr4 linker flag, because the application wishes to use multiple -R parameters as documented in the man page (see comment 14). When that occurs, the error in this ticket happens. The already applied patches to GCC mentioned throughout the bug do not change any behavior -- it still fails to link. David, can you or someone on the linker team determine if this is an issue with the GCC side of things, or it is simply a bug in the linker? It is difficult for an outsider to determine if this is purely on the linker side or if GCC is not conforming somehow to what the linker expects.
[Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _.ro_ sections by default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096 Jakub Jelinek changed: What|Removed |Added Target Milestone|8.4 |8.5 --- Comment #25 from Jakub Jelinek --- GCC 8.4.0 has been released, adjusting target milestone.
[Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _.ro_ sections by default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096 David Edelsohn changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2020-01-08 Ever confirmed|0 |1 --- Comment #24 from David Edelsohn --- Confirmed. The patch already was applied to the GCC 8 branch. It's not clear what exact user code is continuing to triggering GCC to emit this unusual mapping.
[Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _.ro_ sections by default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096 james north changed: What|Removed |Added CC||douglas_north at hotmail dot com --- Comment #23 from james north --- we are seeing a similar error building our software stack. ld: 0711-308 SEVERE ERROR: Object /home/jnorth/builds/11-5.dev.4/obj/cosmos_9.engine.cli/engine/main.o, csect <_main.ro_> The csect is part of the .text section. collect2: error: ld returned 12 exit status any idea if this will make it into 8.4?