rulimine/stage23/lib/elf.h

18 lines
623 B
C
Raw Normal View History

2020-03-25 03:04:18 +03:00
#ifndef __LIB__ELF_H__
#define __LIB__ELF_H__
#include <stdint.h>
2020-04-14 06:20:55 +03:00
#include <fs/file.h>
2020-03-25 03:04:18 +03:00
#define FIXED_HIGHER_HALF_OFFSET_64 ((uint64_t)0xffffffff80000000)
2020-04-18 19:01:29 +03:00
int elf_bits(struct file_handle *fd);
2020-08-11 19:00:51 +03:00
int elf64_load(struct file_handle *fd, uint64_t *entry_point, uint64_t *top, uint64_t slide, uint32_t alloc_type);
int elf64_load_section(struct file_handle *fd, void *buffer, const char *name, size_t limit, uint64_t slide);
2020-04-18 19:01:29 +03:00
2020-08-11 19:00:51 +03:00
int elf32_load(struct file_handle *fd, uint32_t *entry_point, uint32_t *top, uint32_t alloc_type);
2020-04-18 19:01:29 +03:00
int elf32_load_section(struct file_handle *fd, void *buffer, const char *name, size_t limit);
2020-03-25 03:04:18 +03:00
#endif