aboutsummaryrefslogtreecommitdiff
path: root/lib/sync/locks
diff options
context:
space:
mode:
authorAndrew Thoelke <andrew.thoelke@arm.com>2014-03-18 13:46:55 +0000
committerAndrew Thoelke <andrew.thoelke@arm.com>2014-03-26 21:54:37 +0000
commit0a30cf54af7bb1f77b405062b1d5b44e809d0290 (patch)
tree9b7acf35e8b41803fb7a836dce428a9924ba1587 /lib/sync/locks
parentdccc537a7243d784e0b8b81ce1634e385c3b048b (diff)
downloadarm-trusted-firmware-0a30cf54af7bb1f77b405062b1d5b44e809d0290.tar.gz
Place assembler functions in separate sections
This extends the --gc-sections behaviour to the many assembler support functions in the firmware images by placing each function into its own code section. This is achieved by creating a 'func' macro used to declare each function label. Fixes ARM-software/tf-issues#80 Change-Id: I301937b630add292d2dec6d2561a7fcfa6fec690
Diffstat (limited to 'lib/sync/locks')
-rw-r--r--lib/sync/locks/exclusive/spinlock.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sync/locks/exclusive/spinlock.S b/lib/sync/locks/exclusive/spinlock.S
index 79d19e7..5eae2b0 100644
--- a/lib/sync/locks/exclusive/spinlock.S
+++ b/lib/sync/locks/exclusive/spinlock.S
@@ -28,13 +28,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <asm_macros.S>
+
.globl spin_lock
.globl spin_unlock
- .section .text, "ax";
-
-spin_lock: ; .type spin_lock, %function
+func spin_lock
mov w2, #1
sevl
l1: wfe
@@ -45,6 +45,6 @@ l2: ldaxr w1, [x0]
ret
-spin_unlock: ; .type spin_unlock, %function
+func spin_unlock
stlr wzr, [x0]
ret