xref: /haiku/src/system/runtime_loader/elf_load_image.h (revision 43d1a0dc3c70d1f9c563769881e5be5a7e67842b)
194830eb2SIngo Weinhold /*
294830eb2SIngo Weinhold  * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
394830eb2SIngo Weinhold  * Distributed under the terms of the MIT License.
494830eb2SIngo Weinhold  */
594830eb2SIngo Weinhold #ifndef ELF_LOAD_IMAGE_H
694830eb2SIngo Weinhold #define ELF_LOAD_IMAGE_H
794830eb2SIngo Weinhold 
894830eb2SIngo Weinhold #include "runtime_loader_private.h"
994830eb2SIngo Weinhold 
1094830eb2SIngo Weinhold 
11e3ac2588SAlex Smith status_t	parse_elf_header(elf_ehdr* eheader, int32* _pheaderSize,
1294830eb2SIngo Weinhold 				int32* _sheaderSize);
132aaad308SJérôme Duval #if defined(_COMPAT_MODE)
142aaad308SJérôme Duval 	#if defined(__x86_64__)
152aaad308SJérôme Duval status_t	parse_elf32_header(Elf32_Ehdr* eheader, int32* _pheaderSize,
162aaad308SJérôme Duval 	int32* _sheaderSize);
172aaad308SJérôme Duval 	#else
182aaad308SJérôme Duval status_t	parse_elf64_header(Elf64_Ehdr* eheader, int32* _pheaderSize,
192aaad308SJérôme Duval 	int32* _sheaderSize);
202aaad308SJérôme Duval 	#endif
212aaad308SJérôme Duval #endif
2294830eb2SIngo Weinhold status_t	load_image(char const* name, image_type type, const char* rpath,
23*43d1a0dcSJérôme Duval 	const char* runpath, const char* requestingObjectPath, image_t** _image);
2494830eb2SIngo Weinhold 
2594830eb2SIngo Weinhold 
2694830eb2SIngo Weinhold #endif	// ELF_LOAD_IMAGE_H
27