From patchwork Fri Aug 30 12:09:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jeevitha X-Patchwork-Id: 1978961 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=ejatY4Ww; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WwH523BY3z1ydy for ; Fri, 30 Aug 2024 22:09:26 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 79D71385DDCF for ; Fri, 30 Aug 2024 12:09:24 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 97C28385842A for ; Fri, 30 Aug 2024 12:09:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 97C28385842A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 97C28385842A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725019751; cv=none; b=ORvHmNvNpvSbQ8UH/YWCs1jl3Hz4vsP0umf8TXv4ldtls6levRRk8TfKhZHFG5ms7B5d10C4sRvFvomjoCNdja+pLjSB87hF1Dpw06Y9rJWDJzkufvdpDZdcTURotSpeZS9cDY8LCuV/A+EbwD07Xu4QtvpPuPrtkF3oTEMxtLk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725019751; c=relaxed/simple; bh=QLvFvoBbiMWxh3yNgT2/NPLudL8aq9sQLRZOxtUX8hM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:From:Subject:To; b=X+CUCQirBzRByJbRFihdZLoqgy2FoU+Muxp0k1EwbDHqfALvsX3wCzt8bWBCdFnDQ06AYBa9RrxeD42YuwebGwDIWpLtayWVhlDjJs+SozGiW8casTRk0JefKurgCdf3+gXc1CpeAIoDk1QSYqU90qiHZs64o+i3NPzeuMdlf5Y= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47UA5RIX010341 for ; Fri, 30 Aug 2024 12:09:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h= message-id:date:mime-version:from:subject:to:cc:content-type :content-transfer-encoding; s=pp1; bh=25X0rnhrR/gWt6Ck0ZOk/DgTwo I/ZWV4P0PXYqphNmA=; b=ejatY4WwbuqsQqTjJ22okhIIuxReM6nq+7igEsBSYU GDBx0N/SMq7JQvLThuS/OUcMpfdxqbn6VihokAPIEeXpnqG1vDv2Vxjj1+MyJ/Sc UMPjsChG7E2fbB8WhtYStMRoH40JDz7zovESU7lyMrJEu9xD4lALEb+AMPAx47dg DMWlYsbXhm/Z4St5N3MxFx/FZPOXp9OlWZraFsolO0QlIUcSgt24zvQQk7+C1tJw QIVyzg6euFZhwEIvgeyitldzNRKc8BfJyisUJb9uNqKTC3htaNV0A324LTFFvD9s 9whtVrGCmD0+MvqL9VF4QhidRSm9oHoqM1oeISZc6+Vg== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 419q8uew6n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 30 Aug 2024 12:09:09 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 47UBtDrV027960 for ; Fri, 30 Aug 2024 12:09:08 GMT Received: from smtprelay02.wdc07v.mail.ibm.com ([172.16.1.69]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 417ubnkhyh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 30 Aug 2024 12:09:08 +0000 Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay02.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 47UC95e626084024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2024 12:09:05 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0E2F55805F; Fri, 30 Aug 2024 12:09:05 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B142758066; Fri, 30 Aug 2024 12:09:03 +0000 (GMT) Received: from [9.124.212.159] (unknown [9.124.212.159]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Fri, 30 Aug 2024 12:09:03 +0000 (GMT) Message-ID: <6cae24d1-940e-408d-a1f8-f479399d8612@linux.ibm.com> Date: Fri, 30 Aug 2024 17:39:02 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: jeevitha Subject: [PATCH] linux: powerpc: Fix syscall_cancel build for powerpc64le-linux-gnu [BZ #32125] To: libc-alpha@sourceware.org Cc: Peter Bergner , sachin.monga@ibm.com X-TM-AS-GCONF: 00 X-Proofpoint-GUID: mjQDU7iphTIBgYZRe4yq622Zc9HeB7P7 X-Proofpoint-ORIG-GUID: mjQDU7iphTIBgYZRe4yq622Zc9HeB7P7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-30_06,2024-08-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 clxscore=1011 bulkscore=0 phishscore=0 mlxscore=0 malwarescore=0 mlxlogscore=608 spamscore=0 priorityscore=1501 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2408300091 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org In __syscall_cancel_arch, there's a tail call to __syscall_do_cancel. On P10, since the caller uses the TOC and the callee is using PC-relative addressing, there's only a branch instruction with no NOPs to restore the TOC, which causes the build error. The fix involves adding the NOTOC directive to the branch instruction, informing the linker not to generate a TOC stub, thus resolving the issue. Reviewed-by: Adhemerval Zanella --- sysdeps/powerpc/powerpc64/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h index 643aadaae0..c439b06121 100644 --- a/sysdeps/powerpc/powerpc64/sysdep.h +++ b/sysdeps/powerpc/powerpc64/sysdep.h @@ -354,7 +354,7 @@ LT_LABELSUFFIX(name,_name_end): ; \ #ifdef SHARED # define TAIL_CALL_NO_RETURN(__func) \ - b JUMPTARGET(__func) + b JUMPTARGET (NOTOC (__func)) #else # define TAIL_CALL_NO_RETURN(__func) \ .ifdef .Local ## __func; \