From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68111 invoked by alias); 24 Aug 2016 17:02:16 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 68096 invoked by uid 89); 24 Aug 2016 17:02:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,RCVD_IN_SEMBACKSCATTER autolearn=no version=3.3.2 spammy=2.3.0, __typeof, HAVE_IFUNC, libc_ifunc X-HELO: mx0a-001b2d01.pphosted.com X-IBM-Helo: d06dlp02.portsmouth.uk.ibm.com X-IBM-MailFrom: stli@linux.vnet.ibm.com X-IBM-RcptTo: libc-alpha@sourceware.org From: Stefan Liebler To: libc-alpha@sourceware.org Cc: stli@linux.vnet.ibm.com, fweimer@redhat.com, murphyp@linux.vnet.ibm.com, schwab@linux-m68k.org, joseph_myers@mentor.com Subject: [PATCH v3 7/9] Use libc_ifunc macro for system in libpthread. Date: Wed, 24 Aug 2016 17:02:00 -0000 In-Reply-To: <1472047472-30307-1-git-send-email-stli@linux.vnet.ibm.com> References: <1472047472-30307-1-git-send-email-stli@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16082414-0020-0000-0000-000001ED75FB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16082414-0021-0000-0000-00001D36BD72 Message-Id: <1472047472-30307-7-git-send-email-stli@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-24_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608240127 X-SW-Source: 2016-08/txt/msg00767.txt.bz2 This patch uses the libc_ifunc macro to create already existing ifunc function system_ifunc if HAVE_IFUNC is defined. ChangeLog: * nptl/pt-system.c (system_ifunc): Use libc_ifunc macro. --- nptl/pt-system.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/nptl/pt-system.c b/nptl/pt-system.c index 56f2a89..cc415da 100644 --- a/nptl/pt-system.c +++ b/nptl/pt-system.c @@ -32,21 +32,10 @@ # if HAVE_IFUNC -static __typeof (system) * -__attribute__ ((used)) -system_resolve (void) -{ - return &__libc_system; -} - -asm (".globl system_ifunc\n" - ".type system_ifunc, %gnu_indirect_function"); - -# ifdef HAVE_ASM_SET_DIRECTIVE -asm (".set system_ifunc, system_resolve"); -# else -asm ("system_ifunc = system_resolve"); -# endif +extern __typeof(system) system_ifunc; +# undef INIT_ARCH +# define INIT_ARCH() +libc_ifunc (system_ifunc, &__libc_system) # else /* !HAVE_IFUNC */ -- 2.3.0