[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86: avoid SORT_BY_INIT_PRIORITY with old GNU ld
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Mon, 7 Mar 2022 16:05:58 +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=46aEkjbHFZN+nf3qZnqMYfC5PjuOEPNVjec/auPrBiY=; b=luV42oISNlU5EYvbPFeqCJWy0CSYBjClUapFlfz+k0AM6iVhog2lJ3Khio71hrFtW/dSp+srraSkhyNRGDBW7qp5GvDGtDd8g6A1T5db4rMETlFHNDndU4+XgapFEMnGtVzGBUYDx42K3Mg0LkgKFGGhLHjOPfd2fdXt3KKhV3G9v9n3KQBtrnGlas6B4yoWvA1XhsNhoGrzJUwO0GA1yuf/DT277rSdiBopojCvVF2x//XZh+Fozo14oDQBw/EK80LcG9JmIFKwjrzZRjaO1W+x2KSxQFN9AybZdKI92mrw2AGBEWW4S7bSFQFILgC0ysgdOZBr48uSy3mhdBmZ4g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iy2rKMU2fuVAAvzt7oh7wdO0ycBTI/X1gNzQL1qo6DAJsZ2Qi+4lKWyw1Ev+9nrXgTSgIu4ITWgpERn3BztTI6y81ZwGdmJxI68i+lgZJf3N1PwlmZASemfVsWcKUjBTEAroy93GwkbjSJ+nyqmNhfIgRubNEODS/La6AXtSgwtB/G9BLt/ewF/7bSCE2PrePIaqU0aQxcdCdYixKJyw/MISu2uWGzsZM8P36ns3F5I4cpi1AaRd2xSqZnxETIJWwqeaFN3cbq0Bgud83iWTGiZYAr9HOt/lQZInkyUT4UMznx/BPjDZw19tLE10fS3/83oFRZg3k1YoaAgfqp+rOg==
- 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: Mon, 07 Mar 2022 15:06:16 +0000
- Ironport-data: A9a23:lKenT6s9X9MOoI1SYeOp5KluvufnVFReMUV32f8akzHdYApBsoF/q tZmKWqFaPrfZGP9e48jb9zg8RkEvZPUzN82TAVvqnpmRCpB+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/nOHNIQMcacUsxLbVYMpBwJ1FQyw4bVvqYy2YLjW1jV5 ouoyyHiEATNNwBcYzp8B52r8HuDjNyq0N/PlgVjDRzjlAa2e0g9VPrzF4noR5fLatA88tqBb /TC1NmEElbxpH/BPD8HfoHTKSXmSpaKVeSHZ+E/t6KK2nCurQRquko32WZ1he66RFxlkvgoo Oihu6BcRi9qEJTO288fAyUfDjhRO7AZ6JnYK3aG5Jn7I03uKxMAwt1rBUAye4YZ5vx2ESdF8 vlwxDIlN07ZwbjsmfTiF7cq1p9LwMrDZevzvll6yj7UF7A+SI3rSKTW/95Imjw3g6iiGN6AO pJIN2Q0N3wsZTVBHg8vMM8Qvdy1oWXUTDRDqVOxqo0Otj27IAtZj+G2bYu9lsaxbdpRtlaVo CTB5WuRKgEXMpmTxCSI9lqoh/TThmXrVYQKDrq6+/V2xlqJyQQ7ChcbSF+6qvmRkVOlVpRUL El8x8Y1hfFsrgrxFIC7BkDm5i7f1vIBZzZOO64U0QPO4aiE30GEH0cCU2FRTsMsuvZjEFTGy WS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HwN87n4 nASkpRsSood0fnGaS1rdR2G9D2MROAtBjWu7RjDsJCy8/BrZLQQFm+dGw=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Mar 07, 2022 at 02:49:32PM +0100, Jan Beulich wrote:
> Support for this construct was added in 2.22 only. Avoid the need to
> introduce logic to probe for linker script capabilities by (ab)using the
> probe for a command line option having appeared at about the same time.
>
> Fixes: 4b7fd8153ddf ("x86: fold sections in final binaries")
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> Obviously this doesn't take care of old LLVM ld yet, if any care is
> needed there in the first place.
>
> --- a/xen/arch/x86/arch.mk
> +++ b/xen/arch/x86/arch.mk
> @@ -70,6 +70,11 @@ ifeq ($(CONFIG_UBSAN),y)
> $(call cc-option-add,CFLAGS_UBSAN,CC,-fno-sanitize=alignment)
> endif
>
> +# While not much better than going by raw GNU ld version, utilize that the
> +# feature we're after has appeared in the same release as the
> +# --print-output-format command line option.
> +AFLAGS-$(call ld-option,--print-output-format) +=
> -DHAVE_LD_SORT_BY_INIT_PRIORITY
LLVM ld doesn't have --print-output-format:
% ld --print-output-format
ld: error: unknown argument '--print-output-format'
So it would be always defaulting to SORT. I'm not sure what to
recommend.
Regards, Roger.
|