Blame src/reader/pe_read_export_header.c

e2e2c2
/***************************************************************/
e2e2c2
/*  perk: PE Resource Kit                                      */
e2e2c2
/*  Copyright (C) 2015--2016  Z. Gilboa                        */
e2e2c2
/*  Released under GPLv2 and GPLv3; see COPYING.PERK.          */
e2e2c2
/***************************************************************/
e2e2c2
c0fbae
#include <string.h>
c0fbae
c0fbae
#include <perk/perk.h>
cc6bfc
#include "perk_endian_impl.h"
413f56
#include "perk_reader_impl.h"
c0fbae
8dd726
int pe_read_export_header(const struct pe_raw_export_hdr * p, struct pe_meta_export_hdr * m)
c0fbae
{
d1e52d
	m->eh_export_flags          = pe_read_long(p->eh_export_flags);
d1e52d
	m->eh_time_date_stamp       = pe_read_long(p->eh_time_date_stamp);
f73f55
d1e52d
	m->eh_major_ver             = pe_read_short(p->eh_major_ver);
d1e52d
	m->eh_minor_ver             = pe_read_short(p->eh_minor_ver);
f73f55
d1e52d
	m->eh_name_rva              = pe_read_long(p->eh_name_rva);
d1e52d
	m->eh_ordinal_base          = pe_read_long(p->eh_ordinal_base);
d1e52d
	m->eh_addr_tbl_entries      = pe_read_long(p->eh_addr_tbl_entries);
d1e52d
	m->eh_num_of_name_ptrs      = pe_read_long(p->eh_num_of_name_ptrs);
d1e52d
	m->eh_export_addr_tbl_rva   = pe_read_long(p->eh_export_addr_tbl_rva);
d1e52d
	m->eh_name_ptr_rva          = pe_read_long(p->eh_name_ptr_rva);
d1e52d
	m->eh_ordinal_tbl_rva       = pe_read_long(p->eh_ordinal_tbl_rva);
c0fbae
c0fbae
	return 0;
b5f7f5
}