summaryrefslogtreecommitdiff
path: root/payloads/libpayload/arch
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/arch')
-rw-r--r--payloads/libpayload/arch/arm/exception_asm.S16
-rw-r--r--payloads/libpayload/arch/arm/head.S10
-rw-r--r--payloads/libpayload/arch/arm/memcpy.S2
-rw-r--r--payloads/libpayload/arch/arm/memmove.S2
-rw-r--r--payloads/libpayload/arch/arm/memset.S3
5 files changed, 14 insertions, 19 deletions
diff --git a/payloads/libpayload/arch/arm/exception_asm.S b/payloads/libpayload/arch/arm/exception_asm.S
index 31d759335f..1f369bcc05 100644
--- a/payloads/libpayload/arch/arm/exception_asm.S
+++ b/payloads/libpayload/arch/arm/exception_asm.S
@@ -27,13 +27,7 @@
* SUCH DAMAGE.
*/
- .global exception_stack_end
-exception_stack_end:
- .word 0
-
-exception_handler:
- .word 0
-
+ .text
.align 6
.arm
@@ -88,6 +82,7 @@ exception_common:
ldmfd sp!, { pc }^
+ .align 2
_undefined_instruction: .word exception_undefined_instruction
_software_interrupt: .word exception_software_interrupt
_prefetch_abort: .word exception_prefetch_abort
@@ -96,6 +91,13 @@ _not_used: .word exception_not_used
_irq: .word exception_irq
_fiq: .word exception_fiq
+ .global exception_stack_end
+exception_stack_end:
+ .word 0
+
+exception_handler:
+ .word 0
+
.thumb
.global set_vbar
.thumb_func
diff --git a/payloads/libpayload/arch/arm/head.S b/payloads/libpayload/arch/arm/head.S
index 0d23c7256f..54fdb5defd 100644
--- a/payloads/libpayload/arch/arm/head.S
+++ b/payloads/libpayload/arch/arm/head.S
@@ -29,10 +29,6 @@
#include <arch/asm.h>
-1:
-.align 4
-.word _stack
-
/*
* Our entry point
*/
@@ -43,7 +39,7 @@ ENTRY(_entry)
/* TODO: Clear BSS */
/* Setup new stack */
- ldr sp, 1b
+ ldr sp, 1f
/* TODO: Save old stack pointer and link register */
@@ -57,3 +53,7 @@ ENTRY(_entry)
/* Return to the original context. */
bx lr
ENDPROC(_entry)
+
+.align 4
+1:
+.word _stack
diff --git a/payloads/libpayload/arch/arm/memcpy.S b/payloads/libpayload/arch/arm/memcpy.S
index b8f857bb56..1388d05ad9 100644
--- a/payloads/libpayload/arch/arm/memcpy.S
+++ b/payloads/libpayload/arch/arm/memcpy.S
@@ -52,8 +52,6 @@
ldmfd sp!, {r0, \reg1, \reg2}
.endm
- .text
-
/* Prototype: void *memcpy(void *dest, const void *src, size_t n); */
ENTRY(memcpy)
diff --git a/payloads/libpayload/arch/arm/memmove.S b/payloads/libpayload/arch/arm/memmove.S
index dc29f7458c..bd5f8f1ac5 100644
--- a/payloads/libpayload/arch/arm/memmove.S
+++ b/payloads/libpayload/arch/arm/memmove.S
@@ -13,8 +13,6 @@
#include <arch/asm.h>
#include "asmlib.h"
- .text
-
/*
* Prototype: void *memmove(void *dest, const void *src, size_t n);
*
diff --git a/payloads/libpayload/arch/arm/memset.S b/payloads/libpayload/arch/arm/memset.S
index 945767c599..0c1102deb4 100644
--- a/payloads/libpayload/arch/arm/memset.S
+++ b/payloads/libpayload/arch/arm/memset.S
@@ -13,9 +13,6 @@
#include <arch/asm.h>
#include "asmlib.h"
- .text
- .align 5
-
ENTRY(memset)
ands r3, r0, #3 @ 1 unaligned?
mov ip, r0 @ preserve r0 as return value