This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Avoid PLT when calling __sched_getaffinity_new
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Florian Weimer <fweimer at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 14 Oct 2015 08:11:02 -0700
- Subject: Re: [PATCH] Avoid PLT when calling __sched_getaffinity_new
- Authentication-results: sourceware.org; auth=none
- References: <20150821170918 dot GA29943 at intel dot com> <561E4D6C dot 9040303 at redhat dot com> <CAMe9rOqT6cGee5iXWbqPfvZqYf=z53O-2LggQ-xGkMwQ+o1XAA at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1510141502410 dot 20331 at digraph dot polyomino dot org dot uk>
On Wed, Oct 14, 2015 at 8:06 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Wed, 14 Oct 2015, H.J. Lu wrote:
>
>> On Wed, Oct 14, 2015 at 5:41 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> > On 08/21/2015 07:09 PM, H.J. Lu wrote:
>> >> This patch adds an internal entry for __sched_getaffinity_new so that
>> >> __sched_getaffinity_old calls __sched_getaffinity_new without going
>> >> through PLT.
>> >>
>> >> OK for master?
>> >
>> > This phenomenon is not restricted to just this file. Why do you need to
>> > change this instance in particular?
>> >
>>
>> I opened BZ #18822 and I will remove unnecessary PLT one by one.
>
> Will you also add a testcase for this issue? (You'll need to allow for
> the relocation / relocations in question depending on the architecture,
> with some architectures not having any difference in relocations depending
> on whether functions are marked hidden and so not being able to run such a
> relocation-based test - it might however be possible to test in a
> different way not depending on names of relocations. As usual, if you
> make a change that doesn't include the corresponding changes for all
> architectures, <https://sourceware.org/glibc/wiki/PortStatus> needs
> updating to list non-updated architectures and describe what should be
> done for them.)
I don't have a testcase yet. After removing all unnecessary PLT relocations
on i386 and x86-64, we can do something similar to scripts/localplt.awk
to check libc_pic.a. Each arch can provide its own list, similar to
localplt.data.
--
H.J.