From nobody Mon Feb 9 07:05:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39646+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39646+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1556289780; cv=none; d=zoho.com; s=zohoarc; b=oB7jQUOAJwZoP+zUFSys8y7QrIXetF+TYKqBKVyZon081glsNJamo2QSlhWQNB7wqCthd4hZHPVeMWvRB3GqBPkWujnPrQ8c+SOq4693izIdjS2jWXs1UyZf8SxPubbN+DNLZs0DWBvubRQTKFj72YRbbpaGdbYWniXOAzm3u4s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556289780; h=Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=UjZpLm34UsYhymGToCwejoaUBu1nnVMvrC/if/ebQhM=; b=ZC/v/syjaszHPAYzFSOyoJJaZycCWfkxmqwssFFOxeSV0powjQYuesi1+5VSz+dFt8isWoBUDyfwC3zCJzjatNG98DVkNOVY3IQUaYb7nDey4wO7gMPhmMq079m6w6Fh/YEsmiTFeyhmPnKowoBMzWUtPoEGbO6TvK27amTooDg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39646+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 155628978063576.85139635728933; Fri, 26 Apr 2019 07:43:00 -0700 (PDT) Return-Path: X-Received: from mga11.intel.com (mga11.intel.com []) by groups.io with SMTP; Fri, 26 Apr 2019 07:42:59 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 07:42:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,397,1549958400"; d="scan'208";a="145975673" X-Received: from lgao4-mobl1.ccr.corp.intel.com ([10.255.29.102]) by orsmga003.jf.intel.com with ESMTP; 26 Apr 2019 07:42:58 -0700 From: "Liming Gao" To: devel@edk2.groups.io Subject: [edk2-devel] [Patch 1/7] BaseTools: Add ClangBase.lds for CLANG8 tool chain with max-page-size Date: Fri, 26 Apr 2019 22:42:36 +0800 Message-Id: <20190426144242.19024-2-liming.gao@intel.com> In-Reply-To: <20190426144242.19024-1-liming.gao@intel.com> References: <20190426144242.19024-1-liming.gao@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,liming.gao@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1556289780; bh=adMSXPBj0SnOJaZMWI6Q+PVVbyBRAsPKz41bxC36inI=; h=Date:From:Reply-To:Subject:To; b=CHAdSK626y9MU7a+SV+tbYowqrGSawZsGy9AmdxTS2pdGByPUjwRVVC3MQ8R2IakJQ3 PNi7BFPEjUdAIF0B6NDrWbodJJcGlZIcH/THd9aOCJcI9zXyUPnL+bvQSH4o/phEyLn9U 6fCdvREwC2WWpVm7Qt7q1b6BPPsPDRRuSQA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" LLVM LLD linker doesn't support common-page-size option. So, max-page-size is used. To not impact GCC tool chain, new ClangBase.lds is added. Signed-off-by: Liming Gao --- BaseTools/Scripts/ClangBase.lds | 79 +++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 79 insertions(+) create mode 100644 BaseTools/Scripts/ClangBase.lds diff --git a/BaseTools/Scripts/ClangBase.lds b/BaseTools/Scripts/ClangBase.= lds new file mode 100644 index 0000000000..8abd54aee6 --- /dev/null +++ b/BaseTools/Scripts/ClangBase.lds @@ -0,0 +1,79 @@ +/** @file + + Unified linker script for GCC based builds + + Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2015, Linaro Ltd. All rights reserved.
+ (C) Copyright 2016 Hewlett Packard Enterprise Development LP
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +SECTIONS { + + /* + * The PE/COFF binary consists of DOS and PE/COFF headers, and a sequenc= e of + * section headers adding up to PECOFF_HEADER_SIZE bytes (which differs + * between 32-bit and 64-bit builds). The actual start of the .text sect= ion + * will be rounded up based on its actual alignment. + */ + . =3D PECOFF_HEADER_SIZE; + + .text : ALIGN(CONSTANT(MAXPAGESIZE)) { + *(.text .text.* .stub .gnu.linkonce.t.*) + *(.rodata .rodata.* .gnu.linkonce.r.*) + *(.got .got.*) + + /* + * The contents of AutoGen.c files are mostly constant from the POV of= the + * program, but most of it ends up in .data or .bss by default since f= ew of + * the variable definitions that get emitted are declared as CONST. + * Unfortunately, we cannot pull it into the .text section entirely, s= ince + * patchable PCDs are also emitted here, but we can at least move all = of the + * emitted GUIDs here. + */ + *:AutoGen.obj(.data.g*Guid) + } + + /* + * The alignment of the .data section should be less than or equal to the + * alignment of the .text section. This ensures that the relative offset + * between these sections is the same in the ELF and the PE/COFF version= s of + * this binary. + */ + .data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(MAXPAGESIZE)) { + *(.data .data.* .gnu.linkonce.d.*) + *(.bss .bss.*) + } + + .eh_frame ALIGN(CONSTANT(MAXPAGESIZE)) : { + KEEP (*(.eh_frame)) + } + + .rela (INFO) : { + *(.rela .rela.*) + } + + .hii : ALIGN(CONSTANT(MAXPAGESIZE)) { + KEEP (*(.hii)) + } + + /* + * Retain the GNU build id but in a non-allocatable section so GenFw + * does not copy it into the PE/COFF image. + */ + .build-id (INFO) : { *(.note.gnu.build-id) } + + /DISCARD/ : { + *(.note.GNU-stack) + *(.gnu_debuglink) + *(.interp) + *(.dynsym) + *(.dynstr) + *(.dynamic) + *(.hash .gnu.hash) + *(.comment) + *(COMMON) + } +} --=20 2.13.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#39646): https://edk2.groups.io/g/devel/message/39646 Mute This Topic: https://groups.io/mt/31354045/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-