Skip to contentSkip to conversation

Arm: drop ENFORCE_UNIQUE_SYMBOLS=y workaround again

PATCH In review Jan Beulich 2 participants 2 messages Sep 22

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Arm: drop ENFORCE_UNIQUE_SYMBOLS=y workaround again

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.

---
Likely other .S files should also gain .file, but for now that's largely cosmetic and hence is left out.

xen/arch/arm/Makefile +0 -3
@@ -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:
 
xen/arch/arm/arm32/head.S +2 -0
@@ -17,6 +17,8 @@
  * GNU General Public License for more details.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
xen/arch/arm/arm32/mmu/head.S +2 -0
@@ -5,6 +5,8 @@
  * Arm32 MMU specific start-of-day code.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
xen/arch/arm/arm32/mpu/head.S +2 -0
@@ -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>
xen/arch/arm/arm64/head.S +2 -0
@@ -20,6 +20,8 @@
  * GNU General Public License for more details.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
xen/arch/arm/arm64/mmu/head.S +2 -0
@@ -5,6 +5,8 @@
  * Arm64 MMU specific start-of-day code.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
xen/arch/arm/arm64/mpu/head.S +2 -0
@@ -3,6 +3,8 @@
  * Start-of-day code for an Armv8-R MPU system.
  */
 
+        .file __FILE__
+
 #include <asm/mpu/regions.inc>
 
 /*
Reviewed-by on v1 1/1
#1 lore raw
Quoted 47 lines · Jan Beulich

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.

---
Likely other .S files should also gain .file, but for now that's largely cosmetic and hence is left out.

xen/arch/arm/Makefile +0 -3
@@ -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:
 
xen/arch/arm/arm32/head.S +2 -0
@@ -17,6 +17,8 @@
  * GNU General Public License for more details.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
xen/arch/arm/arm32/mmu/head.S +2 -0
@@ -5,6 +5,8 @@
  * Arm32 MMU specific start-of-day code.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 

xen/arch/arm/arm32/mpu/head.S line 6

Quoted 4 lines
xen/arch/arm/arm32/mpu/head.S +1 -0
@@ -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 ...

Quoted 29 lines
xen/arch/arm/arm32/mpu/head.S +1 -0
+
 #include <asm/arm32/macros.h>
 #include <asm/arm32/sysregs.h>
 #include <asm/cpregs.h>
xen/arch/arm/arm64/head.S +2 -0
@@ -20,6 +20,8 @@
  * GNU General Public License for more details.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
xen/arch/arm/arm64/mmu/head.S +2 -0
@@ -5,6 +5,8 @@
  * Arm64 MMU specific start-of-day code.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 

xen/arch/arm/arm64/mpu/head.S line 6

Quoted 4 lines
xen/arch/arm/arm64/mpu/head.S +1 -0
@@ -3,6 +3,8 @@
  * Start-of-day code for an Armv8-R MPU system.
  */
 
+        .file __FILE__

... and here.

Other than that:

~Michal