From d6bd839b9acfe619afa1db67a2882c0ce839861f Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Fri, 9 Jun 2017 14:36:22 -0300 Subject: [PATCH] Add a way to bypass the PLT when calling getauxval * include/sys/auxv.h (__getauxval): Add a prototype and its libc_hidden_proto. * misc/getauxval.c (__getauxval): Use libc_hidden_def. --- ChangeLog | 6 ++++++ include/sys/auxv.h | 7 +++++++ misc/getauxval.c | 1 + 3 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 519959a911..82e17d1179 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-06-09 Tulio Magno Quites Machado Filho + + * include/sys/auxv.h (__getauxval): Add a prototype and its + libc_hidden_proto. + * misc/getauxval.c (__getauxval): Use libc_hidden_def. + 2017-06-09 Joseph Myers [BZ #21561] diff --git a/include/sys/auxv.h b/include/sys/auxv.h index dede2c36ac..3bab6d05d4 100644 --- a/include/sys/auxv.h +++ b/include/sys/auxv.h @@ -1 +1,8 @@ #include + +#ifndef _ISOMAC + +extern __typeof (getauxval) __getauxval; +libc_hidden_proto (__getauxval) + +#endif /* !_ISOMAC */ diff --git a/misc/getauxval.c b/misc/getauxval.c index c83fbce054..14f42982a2 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)