1 /* 2 * Copyright 2022, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _BSD_SYS_LINK_ELF_H_ 6 #define _BSD_SYS_LINK_ELF_H_ 7 8 9 #include <features.h> 10 11 12 #ifdef _DEFAULT_SOURCE 13 14 15 #include <os/kernel/elf.h> 16 17 18 struct dl_phdr_info { 19 Elf_Addr dlpi_addr; 20 const char *dlpi_name; 21 const Elf_Phdr *dlpi_phdr; 22 Elf_Half dlpi_phnum; 23 }; 24 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 30 typedef int (*__dl_iterate_hdr_callback)(struct dl_phdr_info *, size_t, void *); 31 extern int dl_iterate_phdr(__dl_iterate_hdr_callback, void *); 32 33 #ifdef __cplusplus 34 } 35 #endif 36 37 38 #endif 39 40 41 #endif /* _BSD_SYS_LINK_ELF_H_ */ 42