From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 9A410384AB55 for ; Thu, 18 Apr 2024 07:40:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A410384AB55 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9A410384AB55 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713426006; cv=pass; b=UWs95ou0WawNchWbjV6ELZdr1pk0J/1sK4krhKaxqTznnHZolsOUqbr6Q6ZL6J3e3iZVmy69zSTEPEheyredgn9lkaxJTrQ1l88Xa866EGp0LKMBPii77HQZIVRJDToauh6dxDg7cM7tQy6W6+J/Td2JYaP4o/ExOUqJ6FlQjH8= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713426006; c=relaxed/simple; bh=YDUFQtLWwrzFakO5bF15KxranClqZ4shfKDw/oNZ6Zs=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=nkAEY9Se4r6hK9xznuXLjH1z0+fzw1tVKA1lb6shdfqV6jVytbuMDyT1q9QS/0z+uvNQF5qtbCtZXD+hVKLp0zdvUxai1dPg0Qfu1nYWlv5kUzyV+uNdumqAT2+FjqDJ0neytysHTX6mRHX3i/dVpupU7CGR08sLkkBtltQxOSE= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43I3wugY031342; Thu, 18 Apr 2024 07:40:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=LgNPEF+tQlRw0dEYGhEp6Vh77rycFXg3DJBWR7mttWk=; b=h+ZFEhsNusTcrUNjB2+UAExyzFahHBQVQ/2xgrzLIrCB1U+ZIwX1+9WF4WKIDDMM1UnB Y5GZoAmcWZqC20b0n+YHhh4kOx55oZiLY16G4IKRiIoAdLzUWOTdsPLQw0fAHbIxkmDv /GUXbk8c6fSZAtm0sLUpG744qvxhn2q3SREeoct844YrSlvHLPIoOA9h0BTsnNqdGAa1 Tbi9x5Tx0gMk6UGQICu+5pW7hI37DGI80lMuHWGUNFRzRo2nvgl8A3qiTKw20drmuqmn orujt4h2DmNtwy4ow5LzeVTNbduY3JFM/G06f5zXpqdV+kazW3xCrKlqYntSipKfYZ1C qg== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xfhnuhsrd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Apr 2024 07:40:01 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 43I7dF2R012596; Thu, 18 Apr 2024 07:40:00 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2173.outbound.protection.outlook.com [104.47.58.173]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3xgkwj3y4k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Apr 2024 07:40:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=exDXz/+/LXVeB+2p4CaTOl7Z+cM3/gJV/Xl8WEmilz8T3HxbTpr/D1stfbZrEFytY9HCjOGNP9R4aS6GQXR2jBTbMvg9ij4LKQ+DwS2CkM38yrLGk62ePN4goaIQ0HBwEaqN8NQRv1hgaOFbLyeUdwVks0x29dzpW7UYNIWhuEszHM6B9u0Xx/QCpF9fRiUYlHSIUO4ZlQrDS9Txysg7gZ6ynbyEh8Ob8p1AhScKe6SSFT7CAwfX0/W6IuGsNsrpL1t8L1yHSexhbShMJOL2eiDRhSmrPA2RbIwkmGb8cXyt4xHyocghDdAr1aIgI8OPCZUOTvQEtgN1Kbrv7xahCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LgNPEF+tQlRw0dEYGhEp6Vh77rycFXg3DJBWR7mttWk=; b=J0qrtkSfdyNzRHtx0PIU3TwWc8PdqHnAKkSy+kPnL+oR+lQyVdKAM2wdPmQzuQsHwclSPWrxjsMzDRkUjsLOIkDom27fwqTehViqu9gL5+3SoRlyONeaJRwvOB3ih9HeYUhPNWi1rwhqb1gu4qwnCtDg6ErpC+b+Q5BAEZh/FZVp7n1oeMxB32CiEusr2/JHbN9ssWkgq/8sHijdYc8BS97Vva7/gsbVz5m2KddUV3/3SQMgfP1aHWtLmkXHxTRFYYEqPZ91N0OQWlUGT1IECrMelKeQuOWK+UiEzyM1qjTiQ65FSzsg36e63Q8xQ7CSXunsJozGzzaLoZGQe6oCzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LgNPEF+tQlRw0dEYGhEp6Vh77rycFXg3DJBWR7mttWk=; b=jeFqPYb+3KTF+e5F+ETMnmC55OI3ge6rgMjQbiIC9qdCRW2JQm+m3Q0Y5oprDbK+xUlN4Tgk7RpWvh37cpkg3Hf6IBQxSNZmpnrzh+2iP+2g2k02+NBGoQVt0ZmZh3sV4B9I4eksE/djyst8mKXXHM8UsfRpFr20Qc9BH1D0XIU= Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by BY5PR10MB4273.namprd10.prod.outlook.com (2603:10b6:a03:205::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.49; Thu, 18 Apr 2024 07:39:58 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::6f0e:742a:270:889]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::6f0e:742a:270:889%5]) with mapi id 15.20.7452.049; Thu, 18 Apr 2024 07:39:58 +0000 Message-ID: Date: Thu, 18 Apr 2024 00:39:57 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 03/15] readelf/objdump: Dump SFrame CFA fixed FP and RA offsets Content-Language: en-US To: Jens Remus , binutils@sourceware.org Cc: Andreas Krebbel References: <20240412144718.4191286-1-jremus@linux.ibm.com> <20240412144718.4191286-4-jremus@linux.ibm.com> From: Indu Bhagat In-Reply-To: <20240412144718.4191286-4-jremus@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4P220CA0004.NAMP220.PROD.OUTLOOK.COM (2603:10b6:303:115::9) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|BY5PR10MB4273:EE_ X-MS-Office365-Filtering-Correlation-Id: 470baccd-ae24-47e2-40f8-08dc5f7abf5b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fgnWZoE3i04K0ikGKJb1UV+73dkQ06Wzkk8qlj4zFEYYxqkxTfkupgfPLHMhabRyeGv1uEfhh7P9VsuBqWUNXiFeU6ZqE4TjZY218EDuB04o+geQwgxD37l6YISn7hT3r4yrcpQqfT9gGA7dL6IQT1zBxd8fkbjqDlXw+dRG1XWSsyIbf3sbirGzQEhQL5V2juDPo1rStTgtYx9UL7BeZJrzmrES0KX9vEqj0MSYicJno1NmHfwCP4mR3F6JKs5TQ1CzF9JVe145xGtnKiKmuTapPZrCv6vfrL8FlzC7SM5UORYJS4OC+2RDx9jOgCOPUXOWOfydUJMAndrNmWme/jeyCxhKNYTy+D0CLQLdNrj+8YnbT4pRnb74OmomqZ0ZO0ycct5nrF3Py0yI1sBsGdbDjCD7D1WYWgRXihmQBcLv1XwFxQQ/8lvwKTMvmzIL1IBKMxBItan5pEzi6bUuyCjnERToUTD+/mAaVfIOgMVe5ldAaiIV7dvjWqK6LBrvefMdCA+akXBHdPRnsve0W9NgVoeJ4336b0na80K3+H5mcS56I2OMiBqc3Zj1dfniwLsbmW8rkW9XM4r0ag6XWBzoXYjwxw2OfgasYisxH0+8mbSd1ekIW5qv9CSaUuscdEAu9h5otOVwQe7Ll6siTUfpIwz10g6nno7MT5hJh78= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2158.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?K0syNENTOW40WFF2OHhrdF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+f5lmfj2ZKcjf2ulB9GKm5PUvN4qRoPwvdjvh4/5MUvCkILJztFuxsylBp2jFn5ZWeysjDnwA25HptJQOXl29ePSvH/QBxDqky4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 470baccd-ae24-47e2-40f8-08dc5f7abf5b X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2024 07:39:58.1559 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZLjoKP4B8sStZ057ScEZCelWaVkK5v8zgeuRJgR/f9laHlks7C7EtoOVzLMJ30sjxBy6F+ndiQ04wkIw3bIoKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4273 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-18_06,2024-04-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404180053 X-Proofpoint-GUID: yW6M7ST9nUTBOjwbA7e1JSYbisfweBJH X-Proofpoint-ORIG-GUID: yW6M7ST9nUTBOjwbA7e1JSYbisfweBJH X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 4/12/24 07:47, Jens Remus wrote: > The SFrame format allows architectures to specify fixed offsets from the > CFA, if any, from which the frame pointer (FP) and/or return address > (RA) may be recovered. These offsets are stored in the SFrame header. > > For instance the SFrame generation in the assembler for x86 AMD64 > specifies a fixed offset from the CFA, from which the return address > (RA) may be recovered. > > When dumping the SFrame header, for instance in readelf/objdump with > option --sframe, do also dump the specified fixed offsets from the CFA, > if any, from which the frame pointer (FP) and return address (RA) may > be recovered. > > Update the common SFrame test case verification patterns to allow for > the optional dumping of the CFA fixed FP/RA offsets. Update the x86- > specific SFrame and SCFI test case verification patterns to require a > CFA fixed RA offset of -8. > > libsframe/ > * sframe-dump.c: Dump CFA fixed FP and RA offsets. > > gas/testsuite/ > * gas/cfi-sframe/cfi-sframe-common-1.d: Test for optional fixed > FP and RA offsets. > * gas/cfi-sframe/cfi-sframe-common-2.d: Likewise. > * gas/cfi-sframe/cfi-sframe-common-3.d: Likewise. > * gas/cfi-sframe/cfi-sframe-common-4.d: Likewise. > * gas/cfi-sframe/cfi-sframe-common-5.d: Likewise. > * gas/cfi-sframe/cfi-sframe-common-6.d: Likewise. > * gas/cfi-sframe/cfi-sframe-common-7.d: Likewise. > * gas/cfi-sframe/cfi-sframe-common-8.d: Likewise. > * gas/cfi-sframe/cfi-sframe-x86_64-1.d: Test for fixed > RA offset. > * gas/cfi-sframe/common-empty-1.d: Test for optional fixed > FP and RA offsets. > * gas/cfi-sframe/common-empty-2.d: Likewise. > * gas/cfi-sframe/common-empty-3.d: Likewise. > * gas/scfi/x86_64/scfi-cfi-sections-1.d: Test for SFrame fixed > RA offset. > * gas/scfi/x86_64/scfi-dyn-stack-1.d: Likewise. > > ld/testsuite/ > * ld-x86-64/sframe-plt-1.d: Test for SFrame fixed RA offset. > * ld-x86-64/sframe-simple-1.d: Likewise. > > Reviewed-by: Andreas Krebbel > Signed-off-by: Jens Remus LGTM. Thanks for your patch. > --- > > Notes (jremus): > Changes v2 -> v3: > - Updated gas synthesized CFI test cases for x86 AMD64 to test for > architecture-specific fixed RA offset instead of using a pattern. > - Updated ld SFrame test cases for x86 AMD64 to test for architecture- > specific fixed RA offset. > - Corrected formatting of ChangeLog in commit message. > > gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d | 2 ++ > gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d | 2 ++ > gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d | 2 ++ > gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d | 2 ++ > gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d | 2 ++ > gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d | 2 ++ > gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d | 2 ++ > gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d | 2 ++ > gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d | 1 + > gas/testsuite/gas/cfi-sframe/common-empty-1.d | 2 ++ > gas/testsuite/gas/cfi-sframe/common-empty-2.d | 2 ++ > gas/testsuite/gas/cfi-sframe/common-empty-3.d | 2 ++ > gas/testsuite/gas/scfi/x86_64/scfi-cfi-sections-1.d | 1 + > gas/testsuite/gas/scfi/x86_64/scfi-dyn-stack-1.d | 1 + > ld/testsuite/ld-x86-64/sframe-plt-1.d | 1 + > ld/testsuite/ld-x86-64/sframe-simple-1.d | 1 + > libsframe/sframe-dump.c | 10 ++++++++++ > 17 files changed, 37 insertions(+) > > diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d > index 32577f31860e..5f4ae00747de 100644 > --- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d > +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d > @@ -8,6 +8,8 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > +#? CFA fixed FP offset: \-?\d+ > +#? CFA fixed RA offset: \-?\d+ > Num FDEs: 1 > Num FREs: 1 > > diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d > index 3e3f74dbe424..ded8c450a942 100644 > --- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d > +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d > @@ -8,6 +8,8 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > +#? CFA fixed FP offset: \-?\d+ > +#? CFA fixed RA offset: \-?\d+ > Num FDEs: 1 > Num FREs: 1 > > diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d > index 6430d463a891..d23fd9790f63 100644 > --- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d > +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d > @@ -8,6 +8,8 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > +#? CFA fixed FP offset: \-?\d+ > +#? CFA fixed RA offset: \-?\d+ > Num FDEs: 1 > Num FREs: 1 > > diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d > index 319ff96cce2a..ca559bd0a029 100644 > --- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d > +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d > @@ -8,6 +8,8 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > +#? CFA fixed FP offset: \-?\d+ > +#? CFA fixed RA offset: \-?\d+ > Num FDEs: 1 > Num FREs: 3 > > diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d > index 82d34973ddde..ee82053e13db 100644 > --- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d > +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d > @@ -8,6 +8,8 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > +#? CFA fixed FP offset: \-?\d+ > +#? CFA fixed RA offset: \-?\d+ > Num FDEs: 1 > Num FREs: 3 > > diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d > index fe6917c70800..9d54b98552bf 100644 > --- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d > +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d > @@ -8,6 +8,8 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > +#? CFA fixed FP offset: \-?\d+ > +#? CFA fixed RA offset: \-?\d+ > Num FDEs: 1 > Num FREs: 3 > > diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d > index 39724d9cdf19..2b7fe3aec8f4 100644 > --- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d > +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d > @@ -8,6 +8,8 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > +#? CFA fixed FP offset: \-?\d+ > +#? CFA fixed RA offset: \-?\d+ > Num FDEs: 1 > Num FREs: 3 > > diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d > index c0a0e627fad9..d654e1d0bcd4 100644 > --- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d > +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d > @@ -8,6 +8,8 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > +#? CFA fixed FP offset: \-?\d+ > +#? CFA fixed RA offset: \-?\d+ > Num FDEs: 1 > Num FREs: 2 > > diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d > index ae36c21b3b7c..c8b5e6adfea0 100644 > --- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d > +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d > @@ -8,6 +8,7 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > + CFA fixed RA offset: \-8 > Num FDEs: 1 > Num FREs: 4 > > diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-1.d b/gas/testsuite/gas/cfi-sframe/common-empty-1.d > index b133b15b051d..125612ff841f 100644 > --- a/gas/testsuite/gas/cfi-sframe/common-empty-1.d > +++ b/gas/testsuite/gas/cfi-sframe/common-empty-1.d > @@ -9,6 +9,8 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > +#? CFA fixed FP offset: \-?\d+ > +#? CFA fixed RA offset: \-?\d+ > Num FDEs: 0 > Num FREs: 0 > > diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-2.d b/gas/testsuite/gas/cfi-sframe/common-empty-2.d > index c5bc8594f1b7..59328fc1033f 100644 > --- a/gas/testsuite/gas/cfi-sframe/common-empty-2.d > +++ b/gas/testsuite/gas/cfi-sframe/common-empty-2.d > @@ -9,6 +9,8 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > +#? CFA fixed FP offset: \-?\d+ > +#? CFA fixed RA offset: \-?\d+ > Num FDEs: 0 > Num FREs: 0 > > diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-3.d b/gas/testsuite/gas/cfi-sframe/common-empty-3.d > index df0b19ee1bd1..5914c620760d 100644 > --- a/gas/testsuite/gas/cfi-sframe/common-empty-3.d > +++ b/gas/testsuite/gas/cfi-sframe/common-empty-3.d > @@ -8,6 +8,8 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > +#? CFA fixed FP offset: \-?\d+ > +#? CFA fixed RA offset: \-?\d+ > Num FDEs: 0 > Num FREs: 0 > > diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-cfi-sections-1.d b/gas/testsuite/gas/scfi/x86_64/scfi-cfi-sections-1.d > index 5962980256c1..c45933b72edc 100644 > --- a/gas/testsuite/gas/scfi/x86_64/scfi-cfi-sections-1.d > +++ b/gas/testsuite/gas/scfi/x86_64/scfi-cfi-sections-1.d > @@ -8,6 +8,7 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > + CFA fixed RA offset: \-8 > Num FDEs: 1 > Num FREs: 5 > > diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-dyn-stack-1.d b/gas/testsuite/gas/scfi/x86_64/scfi-dyn-stack-1.d > index b51546af1494..6cd0484d5793 100644 > --- a/gas/testsuite/gas/scfi/x86_64/scfi-dyn-stack-1.d > +++ b/gas/testsuite/gas/scfi/x86_64/scfi-dyn-stack-1.d > @@ -9,6 +9,7 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: NONE > + CFA fixed RA offset: \-8 > Num FDEs: 1 > Num FREs: 4 > > diff --git a/ld/testsuite/ld-x86-64/sframe-plt-1.d b/ld/testsuite/ld-x86-64/sframe-plt-1.d > index 5e734610b970..9d123a73826d 100644 > --- a/ld/testsuite/ld-x86-64/sframe-plt-1.d > +++ b/ld/testsuite/ld-x86-64/sframe-plt-1.d > @@ -12,6 +12,7 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: SFRAME_F_FDE_SORTED > + CFA fixed RA offset: \-8 > #... > > Function Index : > diff --git a/ld/testsuite/ld-x86-64/sframe-simple-1.d b/ld/testsuite/ld-x86-64/sframe-simple-1.d > index 7f4db31fe1b7..ce5f94386ac2 100644 > --- a/ld/testsuite/ld-x86-64/sframe-simple-1.d > +++ b/ld/testsuite/ld-x86-64/sframe-simple-1.d > @@ -12,6 +12,7 @@ Contents of the SFrame section .sframe: > > Version: SFRAME_VERSION_2 > Flags: SFRAME_F_FDE_SORTED > + CFA fixed RA offset: \-8 > #... > > Function Index : > diff --git a/libsframe/sframe-dump.c b/libsframe/sframe-dump.c > index 42a086a5691f..493d052ce91f 100644 > --- a/libsframe/sframe-dump.c > +++ b/libsframe/sframe-dump.c > @@ -47,6 +47,8 @@ dump_sframe_header (sframe_decoder_ctx *sfd_ctx) > uint8_t flags; > char *flags_str; > const char *ver_str = NULL; > + int8_t cfa_fixed_fp_offset; > + int8_t cfa_fixed_ra_offset; > const sframe_header *header = &(sfd_ctx->sfd_header); > > /* Prepare SFrame section version string. */ > @@ -82,12 +84,20 @@ dump_sframe_header (sframe_decoder_ctx *sfd_ctx) > else > strcpy (flags_str, "NONE"); > > + /* CFA fixed FP and RA offsets. */ > + cfa_fixed_fp_offset = header->sfh_cfa_fixed_fp_offset; > + cfa_fixed_ra_offset = header->sfh_cfa_fixed_ra_offset; > + > const char* subsec_name = "Header"; > printf ("\n"); > printf (" %s :\n", subsec_name); > printf ("\n"); > printf (" Version: %s\n", ver_str); > printf (" Flags: %s\n", flags_str); > + if (cfa_fixed_fp_offset != SFRAME_CFA_FIXED_FP_INVALID) > + printf (" CFA fixed FP offset: %d\n", cfa_fixed_fp_offset); > + if (cfa_fixed_ra_offset != SFRAME_CFA_FIXED_RA_INVALID) > + printf (" CFA fixed RA offset: %d\n", cfa_fixed_ra_offset); > printf (" Num FDEs: %d\n", sframe_decoder_get_num_fidx (sfd_ctx)); > printf (" Num FREs: %d\n", header->sfh_num_fres); >