greenhills: fix the moblib asm compile error

CC:  assert/lib_assert.c [asarm] (error #2179) modlib/modlib_globals.S 61: unexpected token type (char) encountered; expected type (identifier)
  .size \ globalNames , . - \ globalNames
--------^

[asarm] (error #2179) modlib/modlib_globals.S 67: unexpected token type (char) encountered; expected type (identifier)
  .size \ nglobals , . - \ nglobals
--------^

[asarm] (error #2179) modlib/modlib_globals.S 72: unexpected token type (char) encountered; expected type (identifier)
  .size \ global_table , . - \ global_table
--------^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
guoshichao 2024-08-01 21:36:03 +08:00 committed by Alan Carvalho de Assis
parent ed9d57b501
commit d76218e817
1 changed files with 4 additions and 0 deletions

View File

@ -16,7 +16,11 @@
.type SYMBOL(\ep), "object" .type SYMBOL(\ep), "object"
.endm .endm
.macro SIZE ep .macro SIZE ep
# if defined(__ghs__)
.size SYMBOL(ep), . - SYMBOL(ep)
# else
.size SYMBOL(\ep), . - SYMBOL(\ep) .size SYMBOL(\ep), . - SYMBOL(\ep)
# endif
.endm .endm
#else #else
# define SYMBOL(s) _##s # define SYMBOL(s) _##s