From: Allan McRae <allan@archlinux.org>
To: "H.J. Lu" <hjl.tools@gmail.com>, Florian Weimer <fweimer@redhat.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Don't use PLT nor GOT in libc.a [BZ #20750]
Date: Thu, 24 Nov 2016 11:58:00 -0000 [thread overview]
Message-ID: <c4cea244-e116-8eb5-0341-8f2a9e559b2a@archlinux.org> (raw)
In-Reply-To: <CAMe9rOqWq--vo3T8NhEpFGuyA7Z8hHVN_DK6g8rauVaxYKZ+ig@mail.gmail.com>
Ping. My distribution wants to enable PIE and -z,now by default and
this is required for glibc to build.
Allan
On 08/11/16 03:13, H.J. Lu wrote:
> On Mon, Nov 7, 2016 at 8:03 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> On 11/04/2016 08:25 PM, H.J. Lu wrote:
>>>
>>> On Fri, Nov 4, 2016 at 12:03 PM, Florian Weimer <fweimer@redhat.com>
>>> wrote:
>>>>
>>>> On 11/04/2016 06:47 PM, H.J. Lu wrote:
>>>>>
>>>>>
>>>>> There is no need to use PLT nor GOT in libc.a to branch to a function,
>>>>> regardless whether libc.a is compiled with PIC or not.
>>>>>
>>>>> Tested on x86-64. OK for master?
>>>>
>>>>
>>>>
>>>> Isn't this header file used outside of libc as well?
>>>
>>>
>>> It is used for other .a files. If they aren't used to create static
>>> binaries,
>>> PLT/GOT may be used. The resulting executable will work correctly.
>>
>>
>> You mean because ânameâ is automatically mapped to âname@pltâ?
>
> No. There is no "@plt". Linker will create a PLT entry if the function
> is defined in a shared object.
>
>> I find this comment not very illuminating:
>>
>> +/* For libc.a, we want to branch to target directly. */
>> # define JUMPTARGET(name) name
>>
>> And cheating the static linker in this way seems like a future maintenance
>> hazard.
>>
>
> It is ok as long as those static archives aren't used to create shared
> objects.
>
next prev parent reply other threads:[~2016-11-24 11:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 17:47 H.J. Lu
2016-11-04 19:03 ` Florian Weimer
2016-11-04 19:25 ` H.J. Lu
2016-11-07 16:03 ` Florian Weimer
2016-11-07 17:14 ` H.J. Lu
2016-11-24 11:58 ` Allan McRae [this message]
2016-11-25 8:43 ` Florian Weimer
2016-11-28 17:46 ` H.J. Lu
2016-11-28 18:27 ` Joseph Myers
2016-11-28 21:32 ` H.J. Lu
2016-11-28 17:54 ` Szabolcs Nagy
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=c4cea244-e116-8eb5-0341-8f2a9e559b2a@archlinux.org \
--to=allan@archlinux.org \
--cc=fweimer@redhat.com \
--cc=hjl.tools@gmail.com \
--cc=libc-alpha@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).