ft_nm/src/header.c

12 lines
242 B
C
Raw Normal View History

2024-03-15 14:58:57 +00:00
#include "ft_nm.h"
2024-03-25 10:06:09 +00:00
int get_header64(t_mapped_file mapped_file, Elf64_Ehdr *header) {
void *header_ptr = fetch(mapped_file, 0, 64);
if (!header_ptr) {
return FT_NM_FAILURE;
}
ft_memcpy(header, header_ptr, 64);
2024-03-15 14:58:57 +00:00
return FT_NM_SUCCESS;
}
2024-03-19 10:22:37 +00:00