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	add		$0x8, %rsp
17	pop		%rdi
18
19	movq	%rbp, %rsp
20	pop		%rbp
21	ret
22
23.section .fini
24	add		$0x8, %rsp
25	pop		%rdi
26
27	movq	%rbp, %rsp
28	pop		%rbp
29	ret
30