From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eu-smtp-delivery-143.mimecast.com (eu-smtp-delivery-143.mimecast.com [146.101.78.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 44B4D1A1E26 for ; Tue, 13 Sep 2016 07:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1T8uY+9Yz+bgH2DpXDpluP4bVLt1hfLvKgy6ZXPtTDI=; b=Yg0KSFn9TJdAfQS4U1yKd6Ra34m0kVDVzwLxTFoyo2eLjN/xlOIEPj6xtXipc3ZknrCLLxkA9ZPKY0m4/+UhqcOvKo66Nk1IXZdcLVIpKYjznwxHGOFCZymqVA0pxofrCchTsIt3jYDznwr+bjxH4wM+Pg+ubYblP853svEkuMc= Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01lp0182.outbound.protection.outlook.com [213.199.154.182]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-21-wgORS6XoOEK7IR3MEFtV1g-1; Tue, 13 Sep 2016 15:02:27 +0100 Received: from e102648.cambridge.arm.com (217.140.96.140) by VI1PR08MB1198.eurprd08.prod.outlook.com (10.166.45.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.609.9; Tue, 13 Sep 2016 14:02:24 +0000 Date: Tue, 13 Sep 2016 15:03:10 +0100 From: Achin Gupta To: , Ard Biesheuvel Message-ID: <20160913140236.GC540@e102648.cambridge.arm.com> MIME-Version: 1.0 User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: DB4PR04CA0025.eurprd04.prod.outlook.com (10.160.41.35) To VI1PR08MB1198.eurprd08.prod.outlook.com (10.166.45.151) X-MS-Office365-Filtering-Correlation-Id: 9a3bce17-8277-4ec2-838d-08d3dbde96ea X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB1198; 2:bZ/WsG9hQCNFJL+YV3qsTB9VhzQmIG8Zb2xEh8jjHeEkMswUq8vimYd6axtuS4gm3IeN0mBfyJFVDn1aSqiaPc61LLUJedYsXfNR8FMnBIQR2qkpUAEYEFxZElFLE18YuBLf63OJOWldJZxAV0NCbr1rktTula/Cia28Ce1aD+BKtWl741Sujckq5+QxDrLS; 3:tpKLWoON9h1eMs2822hQs/OM8ZYrxW6tf5EEJDF+oimM/JCUxK4fTvWc0uqKIz2oW0qnxQAeAWmgE2nYzMFX1ByABWlTzfJ55BZa92/BkCCY1YbRgrj54HZYLP6aWIgT X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB1198; X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB1198; 25:J4xUR07G6Ua8UiHGiQNE0ihukd5yacrSwIYozi/w3n1K+9HakVt+wanHkSZeadzWC6GqUUAciVAumws0WcbnLDM8sX6YMyax31S+k2GnRbot3CzfHkayNHYdBb3utGq/ZdkoCKauI6vXby69HFoBveT++DRk22BCM1uklLdvIwaVXo2nLABlzKLNuJkkE1HEBahbSTSEFYvGZ4VpTmvskGo/QkufaMPMRd6RFRpvVBvFT/EkBcI2Q5pHl8EJ5wLSMjNi2Z3ArZul9t6e9Th45tXgxdFg889TFFR3SucwZ3E+BC/EwgpZwnish39QR6VqBZfmHTonJe9qTyuKT/5pW+nkbFgWCUEMThIbWxW+6nS4YVMxpLOlKMj7O4om1M1x7Qg8owiNDgEyW6M9WgnqzYZMcIjJpLM+gQJyX3rXtiFj4DvV6cHxY26Va/KXrm1rSi54hEeHY0pOX0zeGJRB+kl0OeuXLrcBPQFxGz32C4gNWvt1eM9JKvfrzt+6SP+aJRqWLCArLrxnTJEgEhHqiYDfnxbHruE6DpiO+WbzAzu1j5klxts9EaL++Fa9c3A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jx6yWcqwD+VvEl88W4xT6npT0kWubTMM2W2DlbvYYVJB5MeDtnzaD39Y8kiTCbATUAID5aj09Z+88A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:VI1PR08MB1198; BCL:0; PCL:0; RULEID:; SRVR:VI1PR08MB1198; X-Forefront-PRVS: 0064B3273C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(53754006)(189002)(40434004)(199003)(33656002)(3846002)(106356001)(42186005)(50466002)(77096005)(6116002)(189998001)(4001350100001)(1076002)(23726003)(81166006)(81156014)(47776003)(19580395003)(101416001)(5001770100001)(97736004)(5890100001)(586003)(2906002)(92566002)(105586002)(8676002)(305945005)(8746002)(86362001)(5660300001)(54356999)(66066001)(107886002)(97756001)(229853001)(83506001)(7846002)(7736002)(68736007)(50986999)(46406003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB1198; H:e102648.cambridge.arm.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR08MB1198; 23:kLYYaGYmS5iF4QMkvCu6P2JUP8bRkVyHip0JR+y1c?= =?us-ascii?Q?AIK3WxiJlWn2Ry48E/G2vOJHjIYS19N7T9e8m1vhg65zLGZi2rVn2OcYptUC?= =?us-ascii?Q?QmgGTugY4IJFaZrV+mXdOmf+E7H1FQnDYOIQe9rr2M7kGHT6Vu5eZKUcy2Rw?= =?us-ascii?Q?hIVzA2oNtHolucUNumpMhZQVkeMsu8kKG2oOTV61idhHKKGvWx7Gz//mTKMD?= =?us-ascii?Q?Gk88wLnBmRkDblNd+6jgNlGWaVhdYBGwcaoXFTc8ZfKShP48w927xa7Lmsp9?= =?us-ascii?Q?jaeqdRdZw3yG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i/ToVFHu8s5XpaX4nGC5sBQZP0XoTg90ZVvFvToLXeJxck0Nc1Q4EHA4lmQqZiDD7f2vU24muoFOpwSyCA/AX6SG7J8C4+/6+V4SpwatuAfFXx2ZWV6+LItQ0dHgpsI= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2016 14:02:24.8084 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB1198 X-MC-Unique: wgORS6XoOEK7IR3MEFtV1g-1 Subject: Relocation fixup during AARCH64 SEC PE-COFF generation? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2016 14:02:33 -0000 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi All, Upon entry into UEFI, the ArmPlatformPkg/PrePi/PeiUniCore.inf SEC module executes directly from within the firmware volume. The FV would typically b= e loaded in DRAM by ARM Trusted Firmware. The rule in ArmJuno.fdf for SEC fil= e types converts a PE-COFF module into a stripped Terse executable as follows= : [Rule.AARCH64.SEC] FILE SEC =3D $(NAMED_GUID) RELOCS_STRIPPED FIXED { TE TE Align =3D Auto $(INF_OUTPUT)/$(MODULE_NAME).efi } The GCC_ARM_AARCH64_DLINK_COMMON variable includes the "--emit-relocs" opti= on when the ELF image is generated. Since the SEC module is able to "XIP" from= the within FV, this means that the relocations have to be fixed up at link time before the TE image is created. It seems to me that in GenFw.c, at least the static relocations are fixed u= p when an ELF image is converted to PE-COFF. Can someone confirm if I am corr= ect in understanding that dynamic relocations will be left as is in the PE-COFF image while static relocations will be fixed up? Please let me know if you need any clarifications. Thanks a lot, Achin IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.