Browse Source

rv32/rom.S: correctly paste symbols

Need an indirection to make sure macros are properly expanded before
pasting. Sigh.
H. Peter Anvin 1 year ago
parent
commit
25ab761380
1 changed files with 4 additions and 3 deletions
  1. 4 3
      rv32/rom.S

+ 4 - 3
rv32/rom.S

@@ -5,7 +5,8 @@
 #include "sections.h"
 #include "ioregs.h"
 
-#define _paste(x,y) x ## y
+#define __paste(x,y) x ## y
+#define _paste(x,y) __paste(x,y)
 
 	.globl NAME
 	__dram_rom
@@ -17,11 +18,11 @@ NAME :
 
 	.type NAME, @object
 
-#define SIZE _paste(NAME, _size)
+#define SIZE _paste(NAME,_size)
 	.globl SIZE
 	SIZE = . - NAME
 	.size NAME , SIZE
 
-#define END  _paste(NAME, _end)
+#define END  _paste(NAME,_end)
 	.globl END
 	END = .