public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Edelsohn <dje.gcc@gmail.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Another AIX Bootstrap failure
Date: Tue, 17 Jun 2014 14:07:00 -0000	[thread overview]
Message-ID: <CAGWvny=xow52i27Xk84j1TL4d5UD2HNSK4AE+xGBopu4m7c+Lg@mail.gmail.com> (raw)
In-Reply-To: <20140617034447.GA28053@kam.mff.cuni.cz>

On Mon, Jun 16, 2014 at 11:44 PM, Jan Hubicka <hubicka@ucw.cz> wrote:

>> The linker is not seeing the local definition of
>> ._ZN14__gnu_parallel9_SettingsC1Ev.  libstdc++ is built with
>> Linux-like semantics, so it allows symbols to be overridden. AIX calls
>> everything through the PLT. But the real definition of the function is
>
> Even static functions?
>
>> not being seen.
>>
>> I'm not exactly sure why inlining changing this and what these extra
>> levels of indirections are trying to accomplish. The visibility of the
>
> To avoid using PLT and GOT when the unit refers to the symbol and we know
> that interposition does not matter.

I am not certain if the linker is creating the PLT stub code because
it wants to allow interpolation or because it cannot see a definition
of the function and wants to allow for some other shared library to
provide the definition at runtime.

> Why branch to a non-global (static) symbol
>   b ._ZN14__gnu_parallel9_SettingsC1Ev.localalias.0
> leads to PLT stub here and why branching to such symbols seems to work otherwise?

Branching to non-global (static) symbol, even an alias, is working
here. The weak function seems to be the problem.

> The failing branch is
>>         b ._ZN14__gnu_parallel9_SettingsC1Ev.localalias.0
> so the call to static construction seems to have happened correctly but we can
> not get right the call from the constructor to static function (that is an alias
> of a global symbol)

The linker appears to not want to resolve the weak function. If I
change ._ZN14__gnu_parallel9_SettingsC1Ev to lglobl, it works. If I
change the static constructor to call the weak function directly,
avoiding the alias, it shows the same failure mode.

I don't know what code generation looked like before.  Was GCC
generating calls to weak functions within the same file?

Thanks, David

  reply	other threads:[~2014-06-17 14:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16  3:31 David Edelsohn
2014-06-16  4:36 ` Jan Hubicka
2014-06-16 11:53   ` David Edelsohn
2014-06-16 15:08     ` Jan Hubicka
2014-06-16 16:16       ` Ramana Radhakrishnan
2014-06-16 17:13       ` David Edelsohn
2014-06-16 21:44         ` Jan Hubicka
2014-06-16 22:42           ` David Edelsohn
2014-06-16 12:01   ` Ramana Radhakrishnan
2014-06-16 18:55   ` David Edelsohn
2014-06-16 22:06     ` Jan Hubicka
2014-06-17  1:51       ` David Edelsohn
2014-06-17  2:55       ` David Edelsohn
2014-06-17  3:44         ` Jan Hubicka
2014-06-17 14:07           ` David Edelsohn [this message]
2014-06-17 16:51             ` Jan Hubicka
2014-06-17 16:57               ` David Edelsohn
2014-06-21  2:43 ` Jan Hubicka
2014-06-21 22:47   ` David Edelsohn
2014-06-21 23:04     ` Jan Hubicka
2014-06-22 14:47   ` David Edelsohn
2014-06-22 19:12     ` Jan Hubicka
2014-06-23 16:49 Dominique Dhumieres
2014-06-23 17:36 ` Jan Hubicka
2014-06-24 19:36   ` Iain Sandoe

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='CAGWvny=xow52i27Xk84j1TL4d5UD2HNSK4AE+xGBopu4m7c+Lg@mail.gmail.com' \
    --to=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    /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).