1/* 2 * Copyright 2009, Axel D��rfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Axel D��rfler, axeld@pinc-software.de 7 * Jonas Sundstr��m, jonas@kirilla.se 8 */ 9 10/** This file contains the first part of the ".init" and ".fini" sections in 11 * the ELF executable. 12 * The functions defined here will be called during initialization/termination 13 * of the loaded executable/library. The ".init" and ".fini" sections are 14 * stacked together like this: 15 * 16 * crti.S entry point 17 * call to _init_before/_term_before 18 * crtbegin.S GCC specific: constructors/destructors are called, ... 19 * crtend.S 20 * crtn.S call to _init_after/_term_after 21 * exit 22 */ 23 24#define FUNCTION(x) .global x; .type x,@function; x 25 26#warning MIPSEL: fixme 27 28.section .init 29FUNCTION(_init): 30 .set noreorder 31 jal __haiku_init_before 32 nop 33 .set reorder 34 // crtbegin.o stuff comes here 35 36.section .fini 37FUNCTION(_fini): 38 .set noreorder 39 jal __haiku_term_before 40 nop 41 .set reorder 42 // crtbegin.o stuff comes here 43