1/*
2 * Copyright 2005-2006, Axel Dörfler, axeld@pinc-software.de.
3 * Copyright 2012, Alex Smith, alex@alex-smith.me.uk.
4 * Distributed under the terms of the MIT License.
5 */
6
7
8/**	This file contains the final part of the ".init" and ".fini" sections in
9 *	the ELF executable. It is tightly connected to crti.S.
10 *	Have a look at crti.S to find a description of what happens here.
11 */
12
13
14.section .init
15	// The image ID is preserved on the stack.
16	pop		%rdi
17	call	__haiku_init_after
18	movq	%rbp, %rsp
19	pop		%rbp
20	ret
21
22.section .fini
23	pop		%rdi
24	call	__haiku_term_after
25	movq	%rbp, %rsp
26	pop		%rbp
27	ret
28