This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [committed, PATCH] x86: Add POINTER_LOCAL_IFUNC_P/PLT_LOCAL_IFUNC_P
- From: Pedro Alves <palves at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 6 Oct 2017 13:25:03 +0100
- Subject: Re: [committed, PATCH] x86: Add POINTER_LOCAL_IFUNC_P/PLT_LOCAL_IFUNC_P
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E69A1883BA
- References: <20171006073831.GA14107@gmail.com> <f9ff8b34-7fe8-fbe6-9a42-ef21baba3851@redhat.com> <CAMe9rOqC3qTfK_Q4Q8ULAh_iXO-HFzhtamJhg0MgdV5EMQg7-Q@mail.gmail.com>
On 10/06/2017 01:15 PM, H.J. Lu wrote:
> On 10/6/17, Pedro Alves <palves@redhat.com> wrote:
>> On 10/06/2017 08:38 AM, H.J. Lu wrote:
>>> +/* TRUE if this is a PLT reference to a local IFUNC. */
>>> +#define PLT_LOCAL_IFUNC_P(INFO, H) \
>>> + ((H)->dynindx == -1 \
>>> + || ((bfd_link_executable (INFO) \
>>> + || ELF_ST_VISIBILITY ((H)->other) != STV_DEFAULT) \
>>> + && (H)->def_regular \
>>> + && (H)->type == STT_GNU_IFUNC))
>>> +
>>
>> OOC, is there a good reason these things are macros
>> instead of (static inline) functions?
>>
>>
>
> Just a habit.
OK. Unless there's a good reason for macros,
IMO functions are usually superior because of better type
safety, safe against multiple argument reevaluation,
and offer much better debugability (you can actually step
through them). But I'm sure this is not news.
> Care to submit a patch?
Nope. Your choice really.
Thanks,
Pedro Alves