[PATCH] Arm: drop ENFORCE_UNIQUE_SYMBOLS=y workaround again

Jan Beulich posted 1 patch 2 days, 7 hours ago
[PATCH] Arm: drop ENFORCE_UNIQUE_SYMBOLS=y workaround again
Posted by Jan Beulich 2 days, 7 hours ago
Both arm<NN>/head.S and arm<NN>/mmu/head.S have a local symbol "fail".
Without a .file directive locals will be associated with the path-less
object filename (head.o). Hence the two symbol names collide. Add .file,
also in arm<NN>/mpu/head.S for consistency.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Likely other .S files should also gain .file, but for now that's largely
cosmetic and hence is left out.

--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -91,9 +91,6 @@ include scripts/Makefile.link
 # Suppress orphan section checking for the time being.
 orphan-handling-y :=
 
-# Downgrade duplicate symbol errors to warnings for the time being.
-syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --warn-dup
-
 .PHONY: include
 include:
 
--- a/xen/arch/arm/arm32/head.S
+++ b/xen/arch/arm/arm32/head.S
@@ -17,6 +17,8 @@
  * GNU General Public License for more details.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
--- a/xen/arch/arm/arm32/mmu/head.S
+++ b/xen/arch/arm/arm32/mmu/head.S
@@ -5,6 +5,8 @@
  * Arm32 MMU specific start-of-day code.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
--- a/xen/arch/arm/arm32/mpu/head.S
+++ b/xen/arch/arm/arm32/mpu/head.S
@@ -3,6 +3,8 @@
  * Start-of-day code for an Armv8-R-AArch32 MPU system.
  */
 
+        .file __FILE__
+
 #include <asm/arm32/macros.h>
 #include <asm/arm32/sysregs.h>
 #include <asm/cpregs.h>
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -20,6 +20,8 @@
  * GNU General Public License for more details.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
--- a/xen/arch/arm/arm64/mmu/head.S
+++ b/xen/arch/arm/arm64/mmu/head.S
@@ -5,6 +5,8 @@
  * Arm64 MMU specific start-of-day code.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
--- a/xen/arch/arm/arm64/mpu/head.S
+++ b/xen/arch/arm/arm64/mpu/head.S
@@ -3,6 +3,8 @@
  * Start-of-day code for an Armv8-R MPU system.
  */
 
+        .file __FILE__
+
 #include <asm/mpu/regions.inc>
 
 /*
Re: [PATCH] Arm: drop ENFORCE_UNIQUE_SYMBOLS=y workaround again
Posted by Orzel, Michal 2 days, 7 hours ago

On 22-Sep-26 12:41, Jan Beulich wrote:
> Both arm<NN>/head.S and arm<NN>/mmu/head.S have a local symbol "fail".
> Without a .file directive locals will be associated with the path-less
> object filename (head.o). Hence the two symbol names collide. Add .file,
> also in arm<NN>/mpu/head.S for consistency.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> Likely other .S files should also gain .file, but for now that's largely
> cosmetic and hence is left out.
> 
> --- a/xen/arch/arm/Makefile
> +++ b/xen/arch/arm/Makefile
> @@ -91,9 +91,6 @@ include scripts/Makefile.link
>  # Suppress orphan section checking for the time being.
>  orphan-handling-y :=
>  
> -# Downgrade duplicate symbol errors to warnings for the time being.
> -syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --warn-dup
> -
>  .PHONY: include
>  include:
>  
> --- a/xen/arch/arm/arm32/head.S
> +++ b/xen/arch/arm/arm32/head.S
> @@ -17,6 +17,8 @@
>   * GNU General Public License for more details.
>   */
>  
> +        .file __FILE__
> +
>  #include <asm/page.h>
>  #include <asm/early_printk.h>
>  
> --- a/xen/arch/arm/arm32/mmu/head.S
> +++ b/xen/arch/arm/arm32/mmu/head.S
> @@ -5,6 +5,8 @@
>   * Arm32 MMU specific start-of-day code.
>   */
>  
> +        .file __FILE__
> +
>  #include <asm/page.h>
>  #include <asm/early_printk.h>
>  
> --- a/xen/arch/arm/arm32/mpu/head.S
> +++ b/xen/arch/arm/arm32/mpu/head.S
> @@ -3,6 +3,8 @@
>   * Start-of-day code for an Armv8-R-AArch32 MPU system.
>   */
>  
> +        .file __FILE__
The MPU files are indented with 4 spaces, so please use 4 spaces here and ...

> +
>  #include <asm/arm32/macros.h>
>  #include <asm/arm32/sysregs.h>
>  #include <asm/cpregs.h>
> --- a/xen/arch/arm/arm64/head.S
> +++ b/xen/arch/arm/arm64/head.S
> @@ -20,6 +20,8 @@
>   * GNU General Public License for more details.
>   */
>  
> +        .file __FILE__
> +
>  #include <asm/page.h>
>  #include <asm/early_printk.h>
>  
> --- a/xen/arch/arm/arm64/mmu/head.S
> +++ b/xen/arch/arm/arm64/mmu/head.S
> @@ -5,6 +5,8 @@
>   * Arm64 MMU specific start-of-day code.
>   */
>  
> +        .file __FILE__
> +
>  #include <asm/page.h>
>  #include <asm/early_printk.h>
>  
> --- a/xen/arch/arm/arm64/mpu/head.S
> +++ b/xen/arch/arm/arm64/mpu/head.S
> @@ -3,6 +3,8 @@
>   * Start-of-day code for an Armv8-R MPU system.
>   */
>  
> +        .file __FILE__
... and here.

Other than that:
Reviewed-by: Michal Orzel <michal.orzel@amd.com>

~Michal