xref: /haiku/headers/private/kernel/elf.h (revision 746cac055adc6ac3308c7bc2d29040fb95689cc9)
1 /*
2  * Copyright 2005, Haiku Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT license.
4  *
5  * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
6  * Distributed under the terms of the NewOS License.
7  */
8 #ifndef _KERNEL_ELF_H
9 #define _KERNEL_ELF_H
10 
11 
12 #include <thread.h>
13 #include <image.h>
14 
15 struct kernel_args;
16 
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 status_t elf_load_user_image(const char *path, struct team *team, int flags, addr_t *_entry);
23 
24 // these two might get public one day:
25 image_id load_kernel_add_on(const char *path);
26 status_t unload_kernel_add_on(image_id id);
27 
28 status_t elf_debug_lookup_symbol_address(addr_t address, addr_t *_baseAddress,
29 			const char **_symbolName, const char **_imageName,
30 			bool *_exactMatch);
31 status_t elf_debug_lookup_user_symbol_address(struct team* team, addr_t address,
32 			addr_t *_baseAddress, const char **_symbolName,
33 			const char **_imageName, bool *_exactMatch);
34 status_t elf_get_image_info_for_address(addr_t address, image_info* info);
35 status_t elf_init(struct kernel_args *args);
36 
37 #ifdef __cplusplus
38 }
39 #endif
40 
41 #endif	/* _KERNEL_ELF_H */
42