[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] x86/build: use --orphan-handling linker option if available
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Fri, 11 Mar 2022 15:56:07 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- 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=Ka8qzxPq7vFRcORU838LOci75elHMb5JrhnGsEEjjCw=; b=O5RQ2xCWa89tZtqfWEFNtZYJZfq7BriquxLD5N5JnBgKtup4/Zwyl+9B9RmgeUWfhDOOnMGK0K5JUsdBaEXL4nKapVZg3PPrDQ6O9hwNWOzywlZVIm9pQ52BrtS3Axs7VmLfmRtMyV/tw/oC7c6G71epiF/qpIaMAVKRxh82bCzajE7iE6uuekT8ArePdroq1Lomttp6hd9wyD1RYaC2tfEdxDO7R0nPebnTF2IVOtJVY2pMluMBD/kSmvBTt0oGeX8K5eE+2edH/ekqWx1dwNG8XeEiMBU8PHzmU0rMaRvNlHihsU3xoPvmJprY601V6tT1ks2YnXKRanQlTJ4A/Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bTD2alvl7sUbLXWfhoCPQw4GSZrLqLEc02negl9yyegmL7cickBOTnlJ8fNBSH9toasOzCAYTBXsNwYg+NmRaFThpWKXsPgoyjPh6ruS/QnO6jwNJrnLJgBGJiXl+jd8sm8PiEMC84r7kkUvyhs2OLdjdgBYPlf+Uu/qnJ+FOB0GMdHLSGrGFwbrRFis4/didOOn9+TVLOEE5qJ6ekq26kpbb5GvSiLqmYh69dXgfRji0OMwtVygK56+0VDURsa/9S20A4yz7jaYNdwR7BcupZf4L/qcJ5qAowop5vUJdoJAvddZlYERUY6sATgOCuTr0cCT9pAL1cxUkBsAYofCSA==
- Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Fri, 11 Mar 2022 14:56:28 +0000
- Ironport-data: A9a23:bzXjsqNL6hVkq6DvrR28l8FynXyQoLVcMsEvi/4bfWQNrUpzgTwAm msaCG6FbKncY2f0L4ogYYu+8UJTv5PVzt9jGgto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH1dOKJQUBUjclkfJKlYAL/En03FFcMpBsJ00o5wbZi29cw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Z4 tdDnIO2WyAVA7ycoqcdCgh1AR56MvgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALNs7kMZlZonh95TrYEewnUdbIRKCiCdpwgmps15kRTKi2i 8wxOANXPTjfaUx2F3wwKL0GxP+WwXb1SmgNwL6SjfVuuDWCpOBr65DyNPLFd9rMQt9a9m6Iq 2SD82nnDxUyMN2E1SHD4n+qnvXIny7wRMQVDrLQ3vxgjUCXx2cTIAYLTlb9qv684nNSQPoGd RZSoHB36/Fvqgr7FbERQiFUvlauvBA1RNxCNNEH+VG3iaqN8iuLOWwLG2sphMMdiOc6Qjkj1 1msltzvBCByvLD9dU9x5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AGyWuKEk4U0i936Ifpo9Fo92XRA==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Mar 11, 2022 at 01:37:54PM +0100, Jan Beulich wrote:
> As was e.g. making necessary 4b7fd8153ddf ("x86: fold sections in final
> binaries"), arbitrary sections appearing without our linker script
> placing them explicitly can be a problem. Have the linker make us aware
> of such sections, so we would know that the script needs adjusting.
>
> To deal with the resulting warnings:
> - Retain .note.* explicitly for ELF, and discard all of them (except the
> earlier consumed .note.gnu.build-id) for PE/COFF.
> - Have explicit statements for .got, .plt, and alike and add assertions
> that they're empty. No output sections will be created for these as
> long as they remain empty (or else the assertions would cause early
> failure anyway).
> - Collect all .rela.* into a single section, with again an assertion
> added for the resulting section to be empty.
> - Extend the enumerating of .debug_* to ELF. Note that for Clang adding
> of .debug_macinfo is necessary. Amend this by its Dwarf5 counterpart,
> .debug_macro, then as well (albeit more may need adding for full
> coverage).
You might also want to add that LLVM ld requires explicit handling of
.symtab, .strtab and .shstrtab.
>
> Suggested-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Thanks, Roger.
|