[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: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 7 Mar 2022 16:29:22 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=P0VkT6DXU3YRObGk0/mjBplc0jMgZPZyH+wkIlIXrms=; b=B23h+aSl9NVgslSfLnxwJubydFvQepI6bWaejZQI93ht0aNU1UVPVwl29dvPP+RzjRwVFPRaJo4Oo39BhCc7ckowZf+Mex7cm+gjwhJf3wjjL7fsfcqXJH/aaiYZ/PnRSoAcxNSYcnbqPweNKxlAbHv4BTuFRSm1g1Okv6+Hra1WJwzZLkTQzC+m4iZV+fsdgo2Wj5/w9PwkjwB/ONJ7JMwD/gxlpk22wT6Lz0O+ECbhVEQ/BwX0Nc+jiLMdeKmCOQ+kz6ZT2Cru8k8oJ0Sxwn07xIn61KhDdVAC9EL2aWBFn3832L9El2n9qn7Li6vHTpTeM5+It8cSHq8Ejkdmtg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UakJC8KMTGI5FHuIa5+YRz/OOw3+m7W7NBMG18f99rjUFrqZQoBJs33O5kRjFkF18u761BRscb0H7/MSm4CcLh2vd0huV8vi37S1hGqCX75uIwdMZixLhLVi1PnHh8PMrpneU1nhE31w6H6J3hLSR1sE33JZheLz0/vrtHaEeEQXwe32ZYU5zXepegjkgpEKQGEKunckVO+dfLCzEhUSrC584YR3stk+nL5+4/02HLIVWM5PW0J2sBo8AeujrdEXluWb+9tqHsUtfJLhamBXwZXJS15wHsHSyNewzRlxYBC2kxZAqK1u4eGpervnaw/gRaEoDGEKPu8EFdBxOCW5pg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 07 Mar 2022 15:29:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.03.2022 16:05, Roger Pau Monné wrote:
> 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.

Do you know if all versions we support know of SORT_BY_INIT_PRIORITY?

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.