This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv2] Add a way to bypass the PLT when calling getauxval
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, pc at us dot ibm dot com, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Fri, 9 Jun 2017 06:29:07 -0700
- Subject: Re: [PATCHv2] Add a way to bypass the PLT when calling getauxval
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1705241951001.9182@digraph.polyomino.org.uk> <1495742765-1722-1-git-send-email-tuliom@linux.vnet.ibm.com> <87zidhb8xf.fsf@linux.vnet.ibm.com>
On Fri, Jun 9, 2017 at 6:13 AM, Tulio Magno Quites Machado Filho
<tuliom@linux.vnet.ibm.com> wrote:
> Ping!
>
> Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> writes:
>
>> 2017-05-25 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
>>
>> * include/sys/auxv.h (__getauxval): Add a prototype and its
>> libc_hidden_proto.
>> * misc/getauxval.c (__getauxval): Use libc_hidden_def.
>> ---
>> include/sys/auxv.h | 7 +++++++
>> misc/getauxval.c | 1 +
>> 2 files changed, 8 insertions(+)
>>
>> diff --git a/include/sys/auxv.h b/include/sys/auxv.h
>> index dede2c3..d46008e 100644
>> --- a/include/sys/auxv.h
>> +++ b/include/sys/auxv.h
>> @@ -1 +1,8 @@
>> #include <misc/sys/auxv.h>
>> +
>> +#ifndef _ISOMAC
>> +
>> +extern __typeof(getauxval) __getauxval;
>> +libc_hidden_proto (__getauxval)
>> +
>> +#endif /* !_ISOMAC */
>> diff --git a/misc/getauxval.c b/misc/getauxval.c
>> index c83fbce..14f4298 100644
>> --- a/misc/getauxval.c
>> +++ b/misc/getauxval.c
>> @@ -43,3 +43,4 @@ __getauxval (unsigned long int type)
>> }
>>
>> weak_alias (__getauxval, getauxval)
>> +libc_hidden_def (__getauxval)
>> --
>> 2.1.0
>>
Which one is better?
https://sourceware.org/ml/libc-alpha/2017-06/msg00332.html
--
H.J.