2019-07-17 20:59:39 +02:00
|
|
|
/*
|
2022-06-28 13:04:52 -04:00
|
|
|
* Copyright 2022, Haiku, Inc. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
2019-07-17 20:59:39 +02:00
|
|
|
*/
|
2022-06-28 13:04:52 -04:00
|
|
|
#ifndef _BSD_SYS_LINK_ELF_H_
|
|
|
|
#define _BSD_SYS_LINK_ELF_H_
|
|
|
|
|
2019-07-17 20:59:39 +02:00
|
|
|
|
2022-06-28 13:04:52 -04:00
|
|
|
#include <features.h>
|
2019-07-17 20:59:39 +02:00
|
|
|
|
|
|
|
|
2019-07-20 12:02:02 +02:00
|
|
|
#ifdef _DEFAULT_SOURCE
|
2019-07-17 20:59:39 +02:00
|
|
|
|
|
|
|
|
2019-07-20 20:45:58 +02:00
|
|
|
#include <os/kernel/elf.h>
|
2019-07-17 20:59:39 +02:00
|
|
|
|
|
|
|
|
2022-06-28 13:04:52 -04:00
|
|
|
struct dl_phdr_info {
|
|
|
|
Elf_Addr dlpi_addr;
|
|
|
|
const char *dlpi_name;
|
|
|
|
const Elf_Phdr *dlpi_phdr;
|
|
|
|
Elf_Half dlpi_phnum;
|
2019-07-17 20:59:39 +02:00
|
|
|
};
|
|
|
|
|
2019-09-14 22:39:10 +02:00
|
|
|
|
2022-06-28 13:04:52 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2019-07-17 20:59:39 +02:00
|
|
|
|
|
|
|
typedef int (*__dl_iterate_hdr_callback)(struct dl_phdr_info *, size_t, void *);
|
|
|
|
extern int dl_iterate_phdr(__dl_iterate_hdr_callback, void *);
|
|
|
|
|
2022-06-28 13:04:52 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2019-07-17 20:59:39 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2022-06-28 13:04:52 -04:00
|
|
|
#endif /* _BSD_SYS_LINK_ELF_H_ */
|