public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: David Edelsohn <dje.gcc@gmail.com>,
	Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Real fix for AIX exception handling
Date: Wed, 29 Mar 2017 20:21:00 -0000	[thread overview]
Message-ID: <bf1fc026-a927-6284-97fa-8aeede700d90@redhat.com> (raw)
In-Reply-To: <CAGWvny=1fOVUuomJ8BqTKsCO3E__mOHJZ+=3F9OWjVpTWZDzuA@mail.gmail.com>

On 03/27/2017 09:41 AM, David Edelsohn wrote:
>> As far as I have discovered, the real problem with AIX exception handling is
>> that the exception landing pads are symbols that must not (but still are)
>> exported from shared libraries - even libstdc++.
>>
>> I'm wondering if attached libtool(!)-patch would fix even that GDB problem
>> once applied to each(!) shared library creation procedure.
>>
>> However, each workaround still applies as long as there's a single shared
>> library involved that has not stopped exporting these symbols yet.
>>
>> Thoughts?
>>
>> Maybe gcc's collect2 should apply this additional symbol filter itself
>> calling (AIX) ld, rather than leaving this to each build system?
>>
>> * m4/libtool.m4 (_LT_LINKER_SHLIBS): On AIX, GNU g++ generates
>> _GLOBAL__ symbols as, amongst others, landing pads for C++ exceptions.
>> These symbols must not be exported from shared libraries, or exception
>> handling may break for applications with runtime linking enabled.
>
> Hi, Michael
>
> Thanks for the analysis.
>
> The problem with EH for GDB involves static linking, not runtime
> linking.
That seems to be my understanding as well.

> And there seems to be different behavior for GCC 4.8 and GCC
> 4.9.
Could it perhaps be an IPA issue -- we know IPA can change symbol 
scope/linkage  in some cases.  Maybe it's mucking things up.  Is there 
more detail in a thread elsewhere on this issue?

>
> The patch seems correct for the runtime linking case, but I don't
> believe that it solves all of the EH issues -- at least more
> explanation is needed.
The current libtool.m4 in GCC looks out of date relative to what's in 
Michael's patch.  So we'd either need a patch specific to the version in 
GCC right now or we'd need to update libtool.m4 then apply Michael's patch.

>
> I think that the problem for static linking needs to be addressed by collect2.
Could be -- I just don't have enough background to know either way.

jeff

  reply	other threads:[~2017-03-29 19:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27 15:44 David Edelsohn
2017-03-29 20:21 ` Jeff Law [this message]
2017-03-29 20:24   ` David Edelsohn
2017-03-29 20:49     ` Jeff Law
2017-03-29 21:11       ` David Edelsohn
2017-03-29 21:23         ` Jeff Law
2017-03-29 21:27           ` David Edelsohn
2017-03-29 22:29             ` Jeff Law
2017-03-30 10:37     ` Michael Haubenwallner
2017-03-30 13:10       ` David Edelsohn
2017-03-31 15:05       ` Jeff Law
  -- strict thread matches above, loose matches on Subject: below --
2017-03-27 10:49 Michael Haubenwallner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf1fc026-a927-6284-97fa-8aeede700d90@redhat.com \
    --to=law@redhat.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=michael.haubenwallner@ssi-schaefer.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).