Add support to indicate size and end of assembly functions
In order for the symbol table in the ELF file to contain the size of
functions written in assembly, it is necessary to report it to the
assembler using the .size directive.
To fulfil the above requirements, this patch introduces an 'endfunc'
macro which contains the .endfunc and .size directives. It also adds
a .func directive to the 'func' assembler macro.
The .func/.endfunc have been used so the assembler can fail if
endfunc is omitted.
Fixes ARM-Software/tf-issues#295
Change-Id: If8cb331b03d7f38fe7e3694d4de26f1075b278fc
Signed-off-by: Kévin Petit <kevin.petit@arm.com>
diff --git a/common/aarch64/debug.S b/common/aarch64/debug.S
index fcf5f26..b3caafb 100644
--- a/common/aarch64/debug.S
+++ b/common/aarch64/debug.S
@@ -98,6 +98,7 @@
asm_print_line_dec
_assert_loop:
b _assert_loop
+endfunc asm_assert
#endif
/*
@@ -114,6 +115,7 @@
b 1b
2:
ret x3
+endfunc asm_print_str
/*
* This function prints a hexadecimal number in x4.
@@ -138,6 +140,7 @@
bl plat_crash_console_putc
cbnz x5, 1b
ret x3
+endfunc asm_print_hex
/***********************************************************
* The common implementation of do_panic for all BL stages
@@ -185,4 +188,5 @@
bl asm_print_hex
_panic_loop:
b _panic_loop
+endfunc do_panic