Message ID | 20250407002559.6593-2-indu.bhagat@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <binutils-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 22DEE3851AAF for <patchwork@sourceware.org>; Mon, 7 Apr 2025 00:28:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22DEE3851AAF Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=WSWE5fDS; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-oracle-onmicrosoft-com header.b=bwn1sX2j X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 1903B3851A9C for <binutils@sourceware.org>; Mon, 7 Apr 2025 00:26:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1903B3851A9C Authentication-Results: sourceware.org; dmarc=pass (p=reject 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 1903B3851A9C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1743985587; cv=pass; b=KgFhquMrUKqIZhQNkGPM1vsnf4cgen0WEiZK3h9XazT6uaCMK1SwrRs2IgqvLHnRR4p8YeYmaLFPMObFWjjTgx5zFI4QKWF15Gwb6HrNuZu+NI5uil0xr+OxTCl1VAi6zhGPbtHopDPXCBuoNiKXxN/e6NWBuFBC7TDvHkAjC8M= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1743985587; c=relaxed/simple; bh=qyNh3wKO5D/3yv1wyxxBMkYVe9lXrcF0+wCDFnvWVWY=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=HND2OW87C0gmACuwOMPT8QOipgykAbBGkTGAIh3wqOOVCw6Vcmdjfi8SLzM2o7y6xPemgaHc5w1gbM/16+C1Hxg3hj9OVlmwo9TfB4nl1taI3uD4Ya9KSMjA8EmjH52DOC485JfYtaGsw/suTEKMYgLRnY95KwH2ZlT8vuD7ouY= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1903B3851A9C Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 536Nawgr025755; Mon, 7 Apr 2025 00:26:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=Zb0IPEYm95qyDJV7vEyj5vUWRP1QK0MsHnPs9cAiecE=; b= WSWE5fDS+PAXdHzIP1muJIlBEQ4aLEFwpz9tw/CMw413/sp1lw8f7CSl8BXI5Ysh +rvyKQoFxM0UqgoHD5Us0+ar1wccTcyEadqGFVhUnzWhSJC673gSnuoALmOWTIZ2 wBvX/pa17rg7kfgR+9WxwOOLZx1yjSV7v7ZhZ8lGb42GhVCO7Dj0lNucQRl+Em2A nUqKQaH/vAXuk1hvdXq9DKNssStXwAnGOXWS+GY9PgrSN5OtajYfodbQ57G+pYk2 bm7iDDuH8tX0ZuzWitxZnlDVyPjasxDMGaU7RuyTP+SV+CMM5r38lMVgd80Q9HHy sQlj0cYphVNNf/NpkiPfpQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 45tuebhk0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 07 Apr 2025 00:26:15 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 536KHAIV013679; Mon, 7 Apr 2025 00:26:13 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 45ttydbgp8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 07 Apr 2025 00:26:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lFnRp3VTIOOqDbtMnGnrnbwS75FjKzZpqSMJNlNlegqLtu/pww1/Ikq64asWmte0nAb4vi9pSKoIQ8f0MmX1WpAlhYgvMuLDbERzXhIdB+KDLVWufR3GcZRcz42Ybj0wiWv1leaqvHmvd77U+ZSQlj0J5edS7UacwLNGRefUDPFmOGJT7TjfyEboOf47e7K1FboFnQT9+MaKo3KFiiWeJguYkawPi8xKSt2nzSNb1uwESRtjflEuJtTG2RT5wrWI4QDsd0Mm1uztpx5btnZW+ywNrBW5DLv+ijedSaftEmATLw7nxhbYNC+3J+X1XlgeSGPT/QZlk3/b7zMBoTzGWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Zb0IPEYm95qyDJV7vEyj5vUWRP1QK0MsHnPs9cAiecE=; b=QSkobr+IW1ih8C0v9AOEaaHepuVZrteX/uSUEg2Bf1Cn1Ge4zt6E7/U7VF4kICRMPWnE6ym06jPsgVT0LMbD1f0jQrgyYGeGAkOkptyzsM4BMDpZZkf07lOrme8MzBw9WeAt4Iw0kBV9Ct26at9QSUWGIFjtbBaygw7clemKNsWudXyBfVoqkoPc/et7NWejdgT15cfvRMsuvESOAtubzLJ6+Yc8zjvJ02qEeSw3JwU+VJMMORKwWtuJ2a+4ymILKo58nnis5Av+hTgEh9CRSS4sd235Fdo1GyL+VvLABdvX1ocfpC0oNFDchR2dyLrGqXz85u0w2bxFnFZNyHnM2w== 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=Zb0IPEYm95qyDJV7vEyj5vUWRP1QK0MsHnPs9cAiecE=; b=bwn1sX2jXf52rRY4k9Q+aUEk9n7aivxoQLavXOqkX4qejBINenEd0+1v8176hhQ5ipeU1RalIqVufCdzHpnlGMQJQi/1GfL1aggCuS/D6A2V266NIO3eAKu8yZEOIEoNHp/kkJIarmyUMVZhP6m9Pi28FDpqZXzexhp6W/IC7go= Received: from SA1PR10MB6365.namprd10.prod.outlook.com (2603:10b6:806:255::12) by PH7PR10MB5816.namprd10.prod.outlook.com (2603:10b6:510:127::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.46; Mon, 7 Apr 2025 00:26:11 +0000 Received: from SA1PR10MB6365.namprd10.prod.outlook.com ([fe80::81bb:1fc4:37c7:a515]) by SA1PR10MB6365.namprd10.prod.outlook.com ([fe80::81bb:1fc4:37c7:a515%4]) with mapi id 15.20.8606.029; Mon, 7 Apr 2025 00:26:11 +0000 From: Indu Bhagat <indu.bhagat@oracle.com> To: binutils@sourceware.org, jbeulich@suse.com Cc: wnliu@google.com, jpoimboe@kernel.org, jremus@linux.ibm.com, Indu Bhagat <indu.bhagat@oracle.com> Subject: [RFC, SCHEME_B 1/7] ld: sframe: emit function start addr as offset from FDE Date: Sun, 6 Apr 2025 17:25:53 -0700 Message-ID: <20250407002559.6593-2-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250407002559.6593-1-indu.bhagat@oracle.com> References: <20250407002559.6593-1-indu.bhagat@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW4PR03CA0066.namprd03.prod.outlook.com (2603:10b6:303:b6::11) To SA1PR10MB6365.namprd10.prod.outlook.com (2603:10b6:806:255::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR10MB6365:EE_|PH7PR10MB5816:EE_ X-MS-Office365-Filtering-Correlation-Id: 9fe914b5-fdb2-445a-816c-08dd756acc6a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|10070799003|376014|366016; X-Microsoft-Antispam-Message-Info: pcTXE66YAXW+VOUYQT63/47Gz5N+ioGcYvJjR/bBsFYHnvSvJi0P7piT3mQV1llrpH5AdgUQJmlyevMB1wYU/E80czy5YyIFk3Y1c0QSHYKKsE3o8VtXjewF1hj/AuvhMCaa3ScIc6mEp+QSOsIpnxhfAYkdJziVqac7B4HgH8+Yt7j6yaccjXfcqWaQreTy5sXBGe7Efp/QtRZL6uYjHCAw349RyJWldVuyOV5rmj4q0h1jLYTfH85yh0C8IDTxRAz553FOfA6cYT7hdCJ+cSMSx2LrtahvaHwQyLE9YDR5TgQX6RpqugihEzKSMOiWDu20I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jl6973 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA1PR10MB6365.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(10070799003)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wDUOnNzNzXD0A839thHYgf2myXlb2M0/4coo92mETxfDYXyg3Xd6FR75QIA98KCE+WmpMW2MMhJI7Zx8EXHfnLK3ABuxSJmVlqSZrDCDvzfXfMwMWE9SPzc7EhU4bok/sj2l2KOJukZozszBKNE0p/nKC7p5EBbh+ZPTCXGOTUZpR0VllY5Cs5bOm7/uPwZjiXdwIqGpgJMVIKyM9CcpX+HEq7p2xrGBSS9Ikc0EdHRzoj1ENzHFMR/aFfQ9kWqsLoZgcPJob7/xfN9+yJthKFjEXN1PDFQL6wd0SQmbnQDXU8CGYbLriV+zHSYSOaCna5NvUHWnCSZR/U+LJYgCuMtRyBooJPwkxcWpuUyyIGsucjbwugNRjteGRtjteK4GBMGeJvFAYl+3Lgk+OATW+x7z5mre5rwohd1qNBg3iHA0WwRlcpZcH2PeIGKD9wzcx/OPLWrI5XW20wtFanJV2EVt3hnAdRaSycmypakZECjuvsHFSTQQbdu2wvFTrp0wqzBB4q/HnfoHVsH2ZI2xixzJYQ/U5joxi1iXfB5LZLlxY6NM6fdPWm6KNaA+fj/JUl4gIw7P3m2SANL04q9Z5g07TW+jSOkLePKVqOjzQEfLkbBSiK0gqMJ35MlQ/UnZQdjgiqGfekfv6eYEaADZvSU+i6vJX2lz+3kNeMcLza0bheRvpTKJO7aCf+Rsnddt0IbX+GC3kMwLp0gEjPeUtrbCY02rON1jR4kOqWk6ceDHUsU52qq5TNcVY95HOxKdB4ZqR6iuFIUMjlKpH90gALnWH0yLoIQH23Ql0vpv/K7R9LDrRNRK3kYKVTg2qsKQ9JPP+er/KsXLrFrD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EwF3zuSN7ScH0U6YiQTzKW0Ha+ofsEbpoczjcG8j2vZL5mOOgpB/EvoDTJnJkLEcul1ERpIeca3unWcuu6nwOGnwjQwv+tzZA4SDj5QS5fRV1R82ysQzdMNZwBYJ+WFyz3fuBbqv+cMIVPTPPNTTdzvk2b7UPWovPKKhpjKv8glLnIPNQyzWBKY52f8eCm+M3JFGjsf1TwU9kTU39MzH0GaPutfsx3HVxaVF7MEBKSBd1wPpKtXNTljz93mLntaeSmVJ2+3SgK3+DVOzK4aW89JXLmhJ5xfTx+MAmosihTXv5IA9wB8VMZ1MH2Q2HipW91z5qEtgIenZjR56U63uzibs5c5B150I0QS5RRcQYwXAUzt3pEzIUj8satL1C6v/RgdOd+xCNGasx6SMzqDpHu47P2/hk= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9fe914b5-fdb2-445a-816c-08dd756acc6a X-MS-Exchange-CrossTenant-AuthSource: SA1PR10MB6365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2025 00:26:11.4308 (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: djW+4ExM7oFDr/MpJkrVXbTUaFsBNkVWbRh2Wq+RzJVFnWUBOppn5meRMHOnsCEUeSobU8S9oXBYBkXiYXgbrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB5816 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-06_08,2025-04-03_03,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2502280000 definitions=main-2504070002 X-Proofpoint-GUID: p0R7Sq5cmwjQEScaLET6drcXUiD37FF_ X-Proofpoint-ORIG-GUID: p0R7Sq5cmwjQEScaLET6drcXUiD37FF_ X-Spam-Status: No, score=-12.8 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_H2, 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org |
Series |
Fix relocatable links with SFrame section
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | warning | Skipped upon request |
linaro-tcwg-bot/tcwg_binutils_build--master-arm | warning | Skipped upon request |
Commit Message
Indu Bhagat
April 7, 2025, 12:25 a.m. UTC
Adopt the new semantics of sfde_func_start_address consistently. For ld, this means even the in-memory contents of the FDE function start address (buffer passed to libsframe sframe_encoder_write () for writing out) are encoded in the new semantics. ChangeLog: * bfd/elf-sframe.c (_bfd_elf_merge_section_sframe): Adopt new semantics of function start address encoding. --- bfd/elf-sframe.c | 7 +++++++ 1 file changed, 7 insertions(+)
Comments
On 07.04.2025 02:25, Indu Bhagat wrote: > Adopt the new semantics of sfde_func_start_address consistently. For > ld, this means even the in-memory contents of the FDE function start > address (buffer passed to libsframe sframe_encoder_write () for writing > out) are encoded in the new semantics. > diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c > @@ -481,6 +481,13 @@ _bfd_elf_merge_section_sframe (bfd *abfd, > address += sframe_read_value (abfd, contents, > pltn_r_offset, 4); > address += (sec->output_offset + r_offset); It took me a while to understand why above does not get canceled out by below and does not naturally fall into place if both were removed. After all the SFrame FDE function start address field value should now already be an offset to the function from the field itself. IIUC address is an offset relative to the FDE in the "imaginary" output .sframe section, as the linker assumes it to be, that is the sections simply concatenated together, with alignment padding added between concatenated input sections if needed. Above makes address an offset relative to the output .sframe section, which effectively "removes" this "imaginary" linker view from the value. Below then makes it relative to the FDE of the planned output .sframe section, as SFrame assumes it to be (prior to sorting of the FDEs), that is one single header followed by all FDEs, followed by all FREs. Is that correct? > + /* SFrame FDE function start address is an offset from the > + sfde_func_start_address field to the start PC. The > + calculation below is the distance of sfde_func_start_address > + field from the start of the output SFrame section. */ > + address -= (sframe_encoder_get_hdr_size (sfe_ctx) > + + ((cur_fidx + num_enc_fidx) /* FDE index. */ > + * sizeof (sframe_func_desc_entry))); Thanks and regards, Jens
On 4/7/25 9:10 AM, Jens Remus wrote: > On 07.04.2025 02:25, Indu Bhagat wrote: >> Adopt the new semantics of sfde_func_start_address consistently. For >> ld, this means even the in-memory contents of the FDE function start >> address (buffer passed to libsframe sframe_encoder_write () for writing >> out) are encoded in the new semantics. > >> diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c > >> @@ -481,6 +481,13 @@ _bfd_elf_merge_section_sframe (bfd *abfd, >> address += sframe_read_value (abfd, contents, >> pltn_r_offset, 4); >> address += (sec->output_offset + r_offset); > > It took me a while to understand why above does not get canceled out > by below and does not naturally fall into place if both were removed. > After all the SFrame FDE function start address field value should > now already be an offset to the function from the field itself. > IIUC address is an offset relative to the FDE in the "imaginary" > output .sframe section, as the linker assumes it to be, that is the > sections simply concatenated together, with alignment padding added > between concatenated input sections if needed. Above makes address > an offset relative to the output .sframe section, which effectively > "removes" this "imaginary" linker view from the value. Below then > makes it relative to the FDE of the planned output .sframe section, > as SFrame assumes it to be (prior to sorting of the FDEs), that is > one single header followed by all FDEs, followed by all FREs. > > Is that correct? > Yes. I will update some code comments in this function to help understand some of this. Thanks >> + /* SFrame FDE function start address is an offset from the >> + sfde_func_start_address field to the start PC. The >> + calculation below is the distance of sfde_func_start_address >> + field from the start of the output SFrame section. */ >> + address -= (sframe_encoder_get_hdr_size (sfe_ctx) >> + + ((cur_fidx + num_enc_fidx) /* FDE index. */ >> + * sizeof (sframe_func_desc_entry))); > > Thanks and regards, > Jens
diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c index 97e00734515..e5e4c09b72c 100644 --- a/bfd/elf-sframe.c +++ b/bfd/elf-sframe.c @@ -481,6 +481,13 @@ _bfd_elf_merge_section_sframe (bfd *abfd, address += sframe_read_value (abfd, contents, pltn_r_offset, 4); address += (sec->output_offset + r_offset); + /* SFrame FDE function start address is an offset from the + sfde_func_start_address field to the start PC. The + calculation below is the distance of sfde_func_start_address + field from the start of the output SFrame section. */ + address -= (sframe_encoder_get_hdr_size (sfe_ctx) + + ((cur_fidx + num_enc_fidx) /* FDE index. */ + * sizeof (sframe_func_desc_entry))); /* FIXME For testing only. Cleanup later. */ // address += (sec->output_section->vma);