[haiku-commits] haiku: hrev53469 - src/system/glue/arch/arm64

  • From: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 9 Sep 2019 09:14:02 -0400 (EDT)

hrev53469 adds 1 changeset to branch 'master'
old head: 051ee9d8fc6cb92b0429810609366643b3bb7d6b
new head: 194a45c6b4183083afdc7fac7b9e85f9162cdeb2
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=194a45c6b418+%5E051ee9d8fc6c

----------------------------------------------------------------------------

194a45c6b418: system/glue: Add arm64 glue
  
  Change-Id: I578c0ac89e5d40f086d0b66d5711f2b78c6087e1
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1840
  Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53469
Commit:      194a45c6b4183083afdc7fac7b9e85f9162cdeb2
URL:         https://git.haiku-os.org/haiku/commit/?id=194a45c6b418
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Sat Sep  7 18:01:36 2019 UTC
Committer:   Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
Commit-Date: Mon Sep  9 13:13:56 2019 UTC

----------------------------------------------------------------------------

3 files changed, 66 insertions(+)
src/system/glue/arch/arm64/Jamfile | 21 +++++++++++++++++++++
src/system/glue/arch/arm64/crti.S  | 28 ++++++++++++++++++++++++++++
src/system/glue/arch/arm64/crtn.S  | 17 +++++++++++++++++

----------------------------------------------------------------------------

diff --git a/src/system/glue/arch/arm64/Jamfile 
b/src/system/glue/arch/arm64/Jamfile
new file mode 100644
index 0000000000..678f32b95a
--- /dev/null
+++ b/src/system/glue/arch/arm64/Jamfile
@@ -0,0 +1,21 @@
+SubDir HAIKU_TOP src system glue arch arm64 ;
+
+local architectureObject ;
+for architectureObject in [ MultiArchSubDirSetup arm64 ] {
+       on $(architectureObject) {
+               local architecture = $(TARGET_PACKAGING_ARCH) ;
+
+               UsePrivateSystemHeaders ;
+
+               local sources =
+                       crti.S
+                       crtn.S
+                       ;
+               MergeObject <$(architecture)>glue_arch_$(TARGET_ARCH).o : 
$(sources) ;
+
+               if $(HAIKU_BUILD_TYPE) = bootstrap {
+                       # build a version for stage0 of the bootstrap process
+                       BootstrapStage0PlatformObjects [ FGristFiles $(sources) 
] : true ;
+               }
+       }
+}
diff --git a/src/system/glue/arch/arm64/crti.S 
b/src/system/glue/arch/arm64/crti.S
new file mode 100644
index 0000000000..680b4f24a5
--- /dev/null
+++ b/src/system/glue/arch/arm64/crti.S
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2005, Axel Dörfler, axeld@xxxxxxxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+
+/**    This file contains the first part of the ".init" and ".fini" sections in
+ *     the ELF executable.
+ *     The functions defined here will be called during 
initialization/termination
+ *     of the loaded executable/library. The ".init" and ".fini" sections are
+ *     stacked together like this:
+ *
+ *     crti.S          entry point
+ *                             call to _init_before/_term_before
+ *     crtbegin.S      GCC specific: constructors/destructors are called, ...
+ *     crtend.S
+ *     crtn.S          call to _init_after/_term_after
+ *                             exit
+ */
+
+#define FUNCTION(x) .global x; .type x,%function; x
+
+.section .init
+FUNCTION(_init):
+       // crtbegin.o stuff comes here
+
+.section .fini
+FUNCTION(_fini):
+       // crtbegin.o stuff comes here
diff --git a/src/system/glue/arch/arm64/crtn.S 
b/src/system/glue/arch/arm64/crtn.S
new file mode 100644
index 0000000000..48e3dc6170
--- /dev/null
+++ b/src/system/glue/arch/arm64/crtn.S
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2005, Axel Dörfler, axeld@xxxxxxxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+
+/**    This file contains the final part of the ".init" and ".fini" sections in
+ *     the ELF executable. It is tightly connected to crti.S.
+ *     Have a look at crti.S to find a description of what happens here.
+ */
+
+.section .init
+       // the image ID and program args are still on the stack
+
+
+.section .fini
+       // the image ID and program args are still on the stack
+


Other related posts:

  • » [haiku-commits] haiku: hrev53469 - src/system/glue/arch/arm64 - Alex von Gluck IV