public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64202] New: C linkage causes shared library exception address problem on ppc64 (not x86_64)
@ 2014-12-05 19:23 mjtruog at gmail dot com
  2014-12-05 19:24 ` [Bug c++/64202] " mjtruog at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: mjtruog at gmail dot com @ 2014-12-05 19:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64202
           Summary: C linkage causes shared library exception address
                    problem on ppc64 (not x86_64)
           Product: gcc
           Version: 4.8.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mjtruog at gmail dot com

Created attachment 34203
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34203&action=edit
Shared library interface with C linkage

This problem was found on the gcc test machine gcc112:
$ uname -a
Linux gcc2-power8.osuosl.org 3.15.10-201.fc20.ppc64p7 #1 SMP Sun Aug 31
13:31:49 MST 2014 ppc64 ppc64 ppc64 GNU/Linux
$ gcc -v -save-temps
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/ppc64-redhat-linux/4.8.3/lto-wrapper
Target: ppc64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-initfini-array --enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-isl=/builddir/build/BUILD/gcc-4.8.3-20140624/obj-ppc64-redhat-linux/isl-install
--with-cloog=/builddir/build/BUILD/gcc-4.8.3-20140624/obj-ppc64-redhat-linux/cloog-install
--enable-secureplt --with-long-double-128 --build=ppc64-redhat-linux
Thread model: posix
gcc version 4.8.3 20140624 (Red Hat 4.8.3-1) (GCC)

The example to replicate the problem is attached.


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

* [Bug c++/64202] C linkage causes shared library exception address problem on ppc64 (not x86_64)
  2014-12-05 19:23 [Bug c++/64202] New: C linkage causes shared library exception address problem on ppc64 (not x86_64) mjtruog at gmail dot com
@ 2014-12-05 19:24 ` mjtruog at gmail dot com
  2014-12-05 19:25 ` mjtruog at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mjtruog at gmail dot com @ 2014-12-05 19:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Michael Truog <mjtruog at gmail dot com> ---
Created attachment 34204
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34204&action=edit
shared library implementation compiled as C++


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

* [Bug c++/64202] C linkage causes shared library exception address problem on ppc64 (not x86_64)
  2014-12-05 19:23 [Bug c++/64202] New: C linkage causes shared library exception address problem on ppc64 (not x86_64) mjtruog at gmail dot com
  2014-12-05 19:24 ` [Bug c++/64202] " mjtruog at gmail dot com
@ 2014-12-05 19:25 ` mjtruog at gmail dot com
  2014-12-05 19:26 ` mjtruog at gmail dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mjtruog at gmail dot com @ 2014-12-05 19:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Michael Truog <mjtruog at gmail dot com> ---
Created attachment 34205
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34205&action=edit
Main executable compiled as C


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

* [Bug c++/64202] C linkage causes shared library exception address problem on ppc64 (not x86_64)
  2014-12-05 19:23 [Bug c++/64202] New: C linkage causes shared library exception address problem on ppc64 (not x86_64) mjtruog at gmail dot com
  2014-12-05 19:24 ` [Bug c++/64202] " mjtruog at gmail dot com
  2014-12-05 19:25 ` mjtruog at gmail dot com
@ 2014-12-05 19:26 ` mjtruog at gmail dot com
  2014-12-05 19:28 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mjtruog at gmail dot com @ 2014-12-05 19:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Michael Truog <mjtruog at gmail dot com> ---
The commands to compile the minimal example are:
g++ -O0 -g -c test_lib.cpp -o test_lib.o 
g++ -fPIC -DPIC -shared test_lib.o -o libtest.so.0.0.0
gcc -O0 -g -c -o test_main.o test_main.c
gcc -o test test_main.o libtest.so.0.0.0 -lstdc++ -Wl,-rpath -Wl,./


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

* [Bug c++/64202] C linkage causes shared library exception address problem on ppc64 (not x86_64)
  2014-12-05 19:23 [Bug c++/64202] New: C linkage causes shared library exception address problem on ppc64 (not x86_64) mjtruog at gmail dot com
                   ` (2 preceding siblings ...)
  2014-12-05 19:26 ` mjtruog at gmail dot com
@ 2014-12-05 19:28 ` pinskia at gcc dot gnu.org
  2014-12-05 19:34 ` mjtruog at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-12-05 19:28 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>g++ -O0 -g -c test_lib.cpp -o test_lib.o 
You need to compile this with -fPIC.


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

* [Bug c++/64202] C linkage causes shared library exception address problem on ppc64 (not x86_64)
  2014-12-05 19:23 [Bug c++/64202] New: C linkage causes shared library exception address problem on ppc64 (not x86_64) mjtruog at gmail dot com
                   ` (3 preceding siblings ...)
  2014-12-05 19:28 ` pinskia at gcc dot gnu.org
@ 2014-12-05 19:34 ` mjtruog at gmail dot com
  2014-12-05 19:36 ` schwab@linux-m68k.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mjtruog at gmail dot com @ 2014-12-05 19:34 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Truog <mjtruog at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #5 from Michael Truog <mjtruog at gmail dot com> ---
That does not resolve the problem.  I have tested it with -fPIC as you have
mentioned with the same result.  The compilation command lines I have provided
are minimal to represent what is being done in autoconf/automake/libtool with a
larger project, this is the minimal example based on that.


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

* [Bug c++/64202] C linkage causes shared library exception address problem on ppc64 (not x86_64)
  2014-12-05 19:23 [Bug c++/64202] New: C linkage causes shared library exception address problem on ppc64 (not x86_64) mjtruog at gmail dot com
                   ` (4 preceding siblings ...)
  2014-12-05 19:34 ` mjtruog at gmail dot com
@ 2014-12-05 19:36 ` schwab@linux-m68k.org
  2014-12-05 19:39 ` mjtruog at gmail dot com
  2014-12-05 19:49 ` schwab@linux-m68k.org
  7 siblings, 0 replies; 9+ messages in thread
From: schwab@linux-m68k.org @ 2014-12-05 19:36 UTC (permalink / raw)
  To: gcc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Andreas Schwab <schwab@linux-m68k.org> ---
You need to compile callback_function with -fexceptions.


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

* [Bug c++/64202] C linkage causes shared library exception address problem on ppc64 (not x86_64)
  2014-12-05 19:23 [Bug c++/64202] New: C linkage causes shared library exception address problem on ppc64 (not x86_64) mjtruog at gmail dot com
                   ` (5 preceding siblings ...)
  2014-12-05 19:36 ` schwab@linux-m68k.org
@ 2014-12-05 19:39 ` mjtruog at gmail dot com
  2014-12-05 19:49 ` schwab@linux-m68k.org
  7 siblings, 0 replies; 9+ messages in thread
From: mjtruog at gmail dot com @ 2014-12-05 19:39 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Truog <mjtruog at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |FIXED

--- Comment #7 from Michael Truog <mjtruog at gmail dot com> ---
Thanks, that was it.


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

* [Bug c++/64202] C linkage causes shared library exception address problem on ppc64 (not x86_64)
  2014-12-05 19:23 [Bug c++/64202] New: C linkage causes shared library exception address problem on ppc64 (not x86_64) mjtruog at gmail dot com
                   ` (6 preceding siblings ...)
  2014-12-05 19:39 ` mjtruog at gmail dot com
@ 2014-12-05 19:49 ` schwab@linux-m68k.org
  7 siblings, 0 replies; 9+ messages in thread
From: schwab@linux-m68k.org @ 2014-12-05 19:49 UTC (permalink / raw)
  To: gcc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |INVALID


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

end of thread, other threads:[~2014-12-05 19:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-05 19:23 [Bug c++/64202] New: C linkage causes shared library exception address problem on ppc64 (not x86_64) mjtruog at gmail dot com
2014-12-05 19:24 ` [Bug c++/64202] " mjtruog at gmail dot com
2014-12-05 19:25 ` mjtruog at gmail dot com
2014-12-05 19:26 ` mjtruog at gmail dot com
2014-12-05 19:28 ` pinskia at gcc dot gnu.org
2014-12-05 19:34 ` mjtruog at gmail dot com
2014-12-05 19:36 ` schwab@linux-m68k.org
2014-12-05 19:39 ` mjtruog at gmail dot com
2014-12-05 19:49 ` schwab@linux-m68k.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).