diff --git a/src/system/glue/arch/arm/crti.S b/src/system/glue/arch/arm/crti.S index 680b4f24a5..af9f5aac19 100644 --- a/src/system/glue/arch/arm/crti.S +++ b/src/system/glue/arch/arm/crti.S @@ -1,4 +1,7 @@ /* + * Copyright 2022, Haiku Inc. All rights reserved. + * Distributed under the terms of the MIT License. + * * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. */ @@ -21,8 +24,10 @@ .section .init FUNCTION(_init): - // crtbegin.o stuff comes here + sub sp, sp, #8 + str lr, [sp] .section .fini FUNCTION(_fini): - // crtbegin.o stuff comes here + sub sp, sp, #8 + str lr, [sp] diff --git a/src/system/glue/arch/arm/crtn.S b/src/system/glue/arch/arm/crtn.S index 48e3dc6170..68556edccc 100644 --- a/src/system/glue/arch/arm/crtn.S +++ b/src/system/glue/arch/arm/crtn.S @@ -1,4 +1,7 @@ /* + * Copyright 2022, Haiku Inc. All rights reserved. + * Distributed under the terms of the MIT License. + * * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. */ @@ -9,9 +12,12 @@ */ .section .init - // the image ID and program args are still on the stack - + ldr lr, [sp] + add sp, sp, #8 + bx lr .section .fini - // the image ID and program args are still on the stack + ldr lr, [sp] + add sp, sp, #8 + bx lr