public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: sergiodj+buildbot@redhat.com
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] PowerPC64 thread-safe stubs not needed for iplt
Date: Thu, 26 Feb 2015 17:59:00 -0000	[thread overview]
Message-ID: <bd4d2eaad0f624bc47b2e27222480a44d1a48108@kwanyin> (raw)

*** TEST RESULTS FOR COMMIT bd4d2eaad0f624bc47b2e27222480a44d1a48108 ***

Author: Alan Modra <amodra@gmail.com>
Branch: master
Commit: bd4d2eaad0f624bc47b2e27222480a44d1a48108

PowerPC64 thread-safe stubs not needed for iplt
I was looking at a current glibc using objdump today and saw an odd
plt call stub.

0000000000044d80 <00000033.plt_call.__strchrnul>:
   44d80:       f8 41 00 28     std     r2,40(r1)
   44d84:       e9 82 8c f8     ld      r12,-29448(r2)
   44d88:       7d 89 03 a6     mtctr   r12
   44d8c:       e8 42 8d 00     ld      r2,-29440(r2)
   44d90:       28 22 00 00     cmpldi  r2,0
   44d94:       4c e2 04 20     bnectr+
   44d98:       48 13 84 f0     b       17d288 <realloc@plt>

What?  It doesn't branch to __strchrnul@plt on finding a zero r2?

Turns out this isn't a real problem since the stub is for loading an
ifunc, so will not be lazily resolved and thus r2 will never be zero.
Of course, that means the thread-safety check is unnecessary.

I also tweak the special __tls_get_addr_opt call stub here, to
restore r2 immediately after the call.  Not doing that might affect
eh_frame unwinding.

	* elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
	thread-safe stubs for iplt.
	(build_tls_get_addr_stub): Restore r2 immediately after call.


             reply	other threads:[~2015-02-26 16:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 17:59 sergiodj+buildbot [this message]
2015-02-26 18:16 ` Failures on Fedora-ppc64be-cc-with-index, branch master sergiodj+buildbot
2015-02-26 18:39 ` Failures on Fedora-ppc64be-native-gdbserver-m64, " sergiodj+buildbot
2015-02-26 22:07 ` Failures on Fedora-i686, " sergiodj+buildbot
2015-02-26 22:16 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2015-02-26 22:29 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2015-02-26 23:30 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot
2015-02-26 23:46 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2015-02-27  7:07 ` Failures on Debian-i686, " sergiodj+buildbot
2015-02-27  8:23 ` Failures on Debian-i686-native-gdbserver, " sergiodj+buildbot
2015-02-27 18:51 ` Failures on Debian-x86_64-native-gdbserver-m64, " sergiodj+buildbot

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=bd4d2eaad0f624bc47b2e27222480a44d1a48108@kwanyin \
    --to=sergiodj+buildbot@redhat.com \
    --cc=gdb-testers@sourceware.org \
    /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).