summaryrefslogtreecommitdiff
path: root/plat/common
diff options
context:
space:
mode:
authorKévin Petit <kevin.petit@arm.com>2015-03-24 14:03:57 +0000
committerKévin Petit <kevin.petit@arm.com>2015-04-08 13:02:59 +0100
commit8b779620d3bad024b83650ecfeaafd7b3ae26ccf (patch)
tree345141826138671577efda8e8b8426dd3f039916 /plat/common
parentcd319142464907e3760129f3e245a325300eb3c3 (diff)
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>
Diffstat (limited to 'plat/common')
-rw-r--r--plat/common/aarch64/platform_helpers.S7
-rw-r--r--plat/common/aarch64/platform_mp_stack.S2
-rw-r--r--plat/common/aarch64/platform_up_stack.S2
3 files changed, 11 insertions, 0 deletions
diff --git a/plat/common/aarch64/platform_helpers.S b/plat/common/aarch64/platform_helpers.S
index c236fd7b..c117449d 100644
--- a/plat/common/aarch64/platform_helpers.S
+++ b/plat/common/aarch64/platform_helpers.S
@@ -52,6 +52,7 @@ func platform_get_core_pos
and x0, x0, #MPIDR_CLUSTER_MASK
add x0, x1, x0, LSR #6
ret
+endfunc platform_get_core_pos
/* -----------------------------------------------------
* Placeholder function which should be redefined by
@@ -61,6 +62,7 @@ func platform_get_core_pos
func platform_check_mpidr
mov x0, xzr
ret
+endfunc platform_check_mpidr
/* -----------------------------------------------------
* Placeholder function which should be redefined by
@@ -69,6 +71,7 @@ func platform_check_mpidr
*/
func plat_report_exception
ret
+endfunc plat_report_exception
/* -----------------------------------------------------
* Placeholder function which should be redefined by
@@ -78,6 +81,7 @@ func plat_report_exception
func plat_crash_console_init
mov x0, #0
ret
+endfunc plat_crash_console_init
/* -----------------------------------------------------
* Placeholder function which should be redefined by
@@ -86,6 +90,7 @@ func plat_crash_console_init
*/
func plat_crash_console_putc
ret
+endfunc plat_crash_console_putc
/* -----------------------------------------------------
* Placeholder function which should be redefined by
@@ -94,6 +99,7 @@ func plat_crash_console_putc
*/
func plat_reset_handler
ret
+endfunc plat_reset_handler
/* -----------------------------------------------------
* Placeholder function which should be redefined by
@@ -103,3 +109,4 @@ func plat_reset_handler
*/
func plat_disable_acp
ret
+endfunc plat_disable_acp
diff --git a/plat/common/aarch64/platform_mp_stack.S b/plat/common/aarch64/platform_mp_stack.S
index 8eb1aa68..7a98d290 100644
--- a/plat/common/aarch64/platform_mp_stack.S
+++ b/plat/common/aarch64/platform_mp_stack.S
@@ -49,6 +49,7 @@ func platform_get_stack
mov x10, x30 // lr
get_mp_stack platform_normal_stacks, PLATFORM_STACK_SIZE
ret x10
+endfunc platform_get_stack
/* -----------------------------------------------------
* void platform_set_stack (unsigned long mpidr)
@@ -62,6 +63,7 @@ func platform_set_stack
bl platform_get_stack
mov sp, x0
ret x9
+endfunc platform_set_stack
/* -----------------------------------------------------
* Per-cpu stacks in normal memory. Each cpu gets a
diff --git a/plat/common/aarch64/platform_up_stack.S b/plat/common/aarch64/platform_up_stack.S
index 73b74b2e..ea6641a7 100644
--- a/plat/common/aarch64/platform_up_stack.S
+++ b/plat/common/aarch64/platform_up_stack.S
@@ -48,6 +48,7 @@
func platform_get_stack
get_up_stack platform_normal_stacks, PLATFORM_STACK_SIZE
ret
+endfunc platform_get_stack
/* -----------------------------------------------------
* void platform_set_stack (unsigned long)
@@ -61,6 +62,7 @@ func platform_set_stack
get_up_stack platform_normal_stacks, PLATFORM_STACK_SIZE
mov sp, x0
ret
+endfunc platform_set_stack
/* -----------------------------------------------------
* Single cpu stack in normal memory.