public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _<filename>.ro_ sections by default
       [not found] <bug-89096-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-31 15:22 ` andrew at ishiboo dot com
  2020-03-31 15:47 ` andrew at ishiboo dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: andrew at ishiboo dot com @ 2020-03-31 15:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096

--- Comment #26 from Andrew Paprocki <andrew at ishiboo dot com> ---
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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _<filename>.ro_ sections by default
       [not found] <bug-89096-4@http.gcc.gnu.org/bugzilla/>
  2020-03-31 15:22 ` [Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _<filename>.ro_ sections by default andrew at ishiboo dot com
@ 2020-03-31 15:47 ` andrew at ishiboo dot com
  2020-04-01 19:25 ` dje at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: andrew at ishiboo dot com @ 2020-03-31 15:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096

--- Comment #27 from Andrew Paprocki <andrew at ishiboo dot com> ---
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _<filename>.ro_ sections by default
       [not found] <bug-89096-4@http.gcc.gnu.org/bugzilla/>
  2020-03-31 15:22 ` [Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _<filename>.ro_ sections by default andrew at ishiboo dot com
  2020-03-31 15:47 ` andrew at ishiboo dot com
@ 2020-04-01 19:25 ` dje at gcc dot gnu.org
  2020-04-01 20:45 ` andrew at ishiboo dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: dje at gcc dot gnu.org @ 2020-04-01 19:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096

--- Comment #28 from David Edelsohn <dje at gcc dot gnu.org> ---
GCC 7 is no longer supported.  The patch was backported and released in GCC 8.4
and GCC 9.1.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _<filename>.ro_ sections by default
       [not found] <bug-89096-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-04-01 19:25 ` dje at gcc dot gnu.org
@ 2020-04-01 20:45 ` andrew at ishiboo dot com
  2020-04-06  1:58 ` dje at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: andrew at ishiboo dot com @ 2020-04-01 20:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096

--- Comment #29 from Andrew Paprocki <andrew at ishiboo dot com> ---
David, Using GCC 9.2.0 I can reproduce using the steps from comment 27. Did you
run them yourself?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _<filename>.ro_ sections by default
       [not found] <bug-89096-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-04-01 20:45 ` andrew at ishiboo dot com
@ 2020-04-06  1:58 ` dje at gcc dot gnu.org
  2020-04-06 16:06 ` dje at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: dje at gcc dot gnu.org @ 2020-04-06  1:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096

--- Comment #30 from David Edelsohn <dje at gcc dot gnu.org> ---
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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _<filename>.ro_ sections by default
       [not found] <bug-89096-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-04-06  1:58 ` dje at gcc dot gnu.org
@ 2020-04-06 16:06 ` dje at gcc dot gnu.org
  2020-04-21 19:16 ` law at redhat dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: dje at gcc dot gnu.org @ 2020-04-06 16:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096

--- Comment #31 from David Edelsohn <dje at gcc dot gnu.org> ---
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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _<filename>.ro_ sections by default
       [not found] <bug-89096-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-04-06 16:06 ` dje at gcc dot gnu.org
@ 2020-04-21 19:16 ` law at redhat dot com
  2021-04-27 11:38 ` [Bug target/89096] [8/9/10/11/12 " jakub at gcc dot gnu.org
  2021-04-27 20:32 ` dje at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: law at redhat dot com @ 2020-04-21 19:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |11.0
                 CC|                            |law at redhat dot com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/89096] [8/9/10/11/12 regression] AIX 7 linker rejects _<filename>.ro_ sections by default
       [not found] <bug-89096-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2020-04-21 19:16 ` law at redhat dot com
@ 2021-04-27 11:38 ` jakub at gcc dot gnu.org
  2021-04-27 20:32 ` dje at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-27 11:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.0                        |11.2

--- Comment #32 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.1 has been released, retargeting bugs to GCC 11.2.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/89096] [8/9/10/11/12 regression] AIX 7 linker rejects _<filename>.ro_ sections by default
       [not found] <bug-89096-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2021-04-27 11:38 ` [Bug target/89096] [8/9/10/11/12 " jakub at gcc dot gnu.org
@ 2021-04-27 20:32 ` dje at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: dje at gcc dot gnu.org @ 2021-04-27 20:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096

David Edelsohn <dje at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |WONTFIX

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-04-27 20:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-89096-4@http.gcc.gnu.org/bugzilla/>
2020-03-31 15:22 ` [Bug target/89096] [8/9/10 regression] AIX 7 linker rejects _<filename>.ro_ sections by default andrew at ishiboo dot com
2020-03-31 15:47 ` andrew at ishiboo dot com
2020-04-01 19:25 ` dje at gcc dot gnu.org
2020-04-01 20:45 ` andrew at ishiboo dot com
2020-04-06  1:58 ` dje at gcc dot gnu.org
2020-04-06 16:06 ` dje at gcc dot gnu.org
2020-04-21 19:16 ` law at redhat dot com
2021-04-27 11:38 ` [Bug target/89096] [8/9/10/11/12 " jakub at gcc dot gnu.org
2021-04-27 20:32 ` dje at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).