[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] arm32: Avoid using solaris syntax for .section directive


  • To: Khem Raj <raj.khem@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 1 Aug 2023 09:38:29 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=jrsj4tOqTxTJMHZgg+SgKKHUt7o0rHQ02LTzamC84Wk=; b=Zhsnx3KxKEzJznvQqtoDjVFVOUU6l9cFvl+XzxHUZm0nvzd8RnwIgypRvmzcnO95G7+l+XYWoa9seUWMb851sCkPzLcAwuXvbypIhdPEPcaN1IvdUuG1JeqFhvambZ3egHtXtxkrpXacPaEr1JdeFeezm0EiTuXaalOwrsxzOgn2fmOeGFVN60HQxoebJeVDSo4YwJIdnZ1ufZKqSoUtGUHV3s/TbWwcR2UeLr3CkO42mJgnnKZqFbJca0DMniGU9OLPIbQOmiG1j9lqmDACBjK4HcxcExYBAQt321E+g5cizyXslYekPtXzhIqgIhE0usDtCdZNGtLpzmZLXY3/Vw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KmeE+KFDCm87pSD5vNh7lTzirNh4pafilivCNyeC3/qkyTm5VJ0vnmzyqsjetjijx1aul06Vxt/itcih2d3TN+QpfkHfooGrPFwKW96+GwqClOdGbzjF7PtwEMmPchxVSyI+BvLvwlb0Zxukngj6NUmvISQT+s5fwHztXYJp8yzV0L/+U2WyGqVLyJptD8rFPQUnRdPud2RO8POGQ1c76A9LLmhV6tMCrr5jUTJzHG1dqAjijn+EDJbODrSJipyLkXuKhRZ1h7vI8GjynKvhcCnt0RphqePlfJkcLsJvexHx63u/pD4CJDppz9uEBsgAmC0F8CGMqSRlyLaEJVSqqA==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 01 Aug 2023 07:39:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi,

On 01/08/2023 02:28, Khem Raj wrote:
> 
> 
> Assembler from binutils 2.41 rejects this syntax
> 
> .section "name"[, flags...]
> 
> where flags could be #alloc, #write, #execstr
s/execstr/execinstr + there is also #exclude and #tls if you want to list them 
all

> Switch to using ELF syntax
> 
> .section name[, "flags"[, @type]]
> 
> [1] 
> https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC119
I think it would be better to add a link to 2.41 docs instead or to refer to 
the following commit
of binutils:
4cb88cfae843 "PR11601, Solaris assembler compatibility doesn't work"


> 
> Signed-off-by: Khem Raj <raj.khem@xxxxxxxxx>
> ---
>  xen/arch/arm/arm32/proc-v7.S | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/arch/arm/arm32/proc-v7.S b/xen/arch/arm/arm32/proc-v7.S
> index c90a31d80f..6d3d19b873 100644
> --- a/xen/arch/arm/arm32/proc-v7.S
> +++ b/xen/arch/arm/arm32/proc-v7.S
> @@ -29,7 +29,7 @@ brahma15mp_init:
>          mcr   CP32(r0, ACTLR)
>          mov   pc, lr
> 
> -        .section ".proc.info", #alloc
> +        .section .proc.info, "a"
>          .type __v7_ca15mp_proc_info, #object
>  __v7_ca15mp_proc_info:
>          .long 0x410FC0F0             /* Cortex-A15 */
> @@ -38,7 +38,7 @@ __v7_ca15mp_proc_info:
>          .long caxx_processor
>          .size __v7_ca15mp_proc_info, . - __v7_ca15mp_proc_info
> 
> -        .section ".proc.info", #alloc
> +        .section .proc.info, "a"
>          .type __v7_ca7mp_proc_info, #object
>  __v7_ca7mp_proc_info:
>          .long 0x410FC070             /* Cortex-A7 */
> @@ -47,7 +47,7 @@ __v7_ca7mp_proc_info:
>          .long caxx_processor
>          .size __v7_ca7mp_proc_info, . - __v7_ca7mp_proc_info
> 
> -        .section ".proc.info", #alloc
> +        .section .proc.info, "a"
>          .type __v7_brahma15mp_proc_info, #object
>  __v7_brahma15mp_proc_info:
>          .long 0x420F00F0             /* Broadcom Brahma-B15 */
> --
> 2.41.0
> 
> 

The patch looks good but a fast grep shows that ".section .dtb,#alloc" in 
arch/arm/dtb.S would also want
to be changed (I do not have gas 2.41, so you can check it by specifying dtb to 
be included in Xen image through
"menuconfig->Common Features->Absolute path to device tree blob")

~Michal



 


Rackspace

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