summaryrefslogtreecommitdiff
path: root/lib/locks
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 /lib/locks
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 'lib/locks')
-rw-r--r--lib/locks/exclusive/spinlock.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/locks/exclusive/spinlock.S b/lib/locks/exclusive/spinlock.S
index 5eae2b08..772f14e9 100644
--- a/lib/locks/exclusive/spinlock.S
+++ b/lib/locks/exclusive/spinlock.S
@@ -43,8 +43,10 @@ l2: ldaxr w1, [x0]
stxr w1, w2, [x0]
cbnz w1, l2
ret
+endfunc spin_lock
func spin_unlock
stlr wzr, [x0]
ret
+endfunc spin_unlock