aboutsummaryrefslogtreecommitdiff
path: root/lib/mlibc/options/elf/include/link.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-07 17:28:52 -0500
committerIan Moffett <ian@osmora.org>2024-03-07 18:24:51 -0500
commitf5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 (patch)
tree93b156621dc0303816b37f60ba88051b702d92f6 /lib/mlibc/options/elf/include/link.h
parentbd5969fc876a10b18613302db7087ef3c40f18e1 (diff)
build: Build mlibc + add distclean target
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/elf/include/link.h')
-rw-r--r--lib/mlibc/options/elf/include/link.h58
1 files changed, 0 insertions, 58 deletions
diff --git a/lib/mlibc/options/elf/include/link.h b/lib/mlibc/options/elf/include/link.h
deleted file mode 100644
index 65d54b9..0000000
--- a/lib/mlibc/options/elf/include/link.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef _LINK_H
-#define _LINK_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <elf.h>
-#include <stddef.h>
-
-#if defined(__x86_64__) || defined(__aarch64__) \
- || (defined(__riscv) && __riscv_xlen == 64)
-# define ElfW(type) Elf64_ ## type
-#elif defined(__i386__)
-# define ElfW(type) Elf32_ ## type
-#else
-# error Unknown architecture
-#endif
-
-struct dl_phdr_info {
- ElfW(Addr) dlpi_addr;
- const char *dlpi_name;
- const ElfW(Phdr) *dlpi_phdr;
- ElfW(Half) dlpi_phnum;
- unsigned long long int dlpi_adds;
- unsigned long long int dlpi_subs;
- size_t dlpi_tls_modid;
- void *dlpi_tls_data;
-};
-
-struct link_map {
- Elf64_Addr l_addr;
- char *l_name;
- ElfW(Dyn) *l_ld;
- struct link_map *l_next, *l_prev;
-};
-
-struct r_debug {
- int r_version;
- struct link_map *r_map;
- Elf64_Addr r_brk;
- enum { RT_CONSISTENT, RT_ADD, RT_DELETE } r_state;
- Elf64_Addr r_ldbase;
-};
-
-#ifndef __MLIBC_ABI_ONLY
-
-int dl_iterate_phdr(int (*callback)(struct dl_phdr_info*, size_t, void*), void* data);
-
-extern ElfW(Dyn) _DYNAMIC[];
-
-#endif /* !__MLIBC_ABI_ONLY */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // _LINK_H