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
c0fbae
int pe_read_export_header(const struct pe_export_hdr * p, struct pe_meta_export_hdr * m)
c0fbae
{
f73f55
	m->export_flags		= pe_read_long(p->export_flags);
f73f55
	m->time_date_stamp	= pe_read_long(p->time_date_stamp);
f73f55
f73f55
	m->major_ver		= pe_read_short(p->major_ver);
f73f55
	m->minor_ver		= pe_read_short(p->minor_ver);
f73f55
f73f55
	m->name_rva		= pe_read_long(p->name_rva);
f73f55
	m->ordinal_base		= pe_read_long(p->ordinal_base);
f73f55
	m->addr_tbl_entries	= pe_read_long(p->addr_tbl_entries);
f73f55
	m->num_of_name_ptrs	= pe_read_long(p->num_of_name_ptrs);
f73f55
	m->export_addr_tbl_rva	= pe_read_long(p->export_addr_tbl_rva);
f73f55
	m->name_ptr_rva		= pe_read_long(p->name_ptr_rva);
f73f55
	m->ordinal_tbl_rva	= pe_read_long(p->ordinal_tbl_rva);
c0fbae
c0fbae
	return 0;
b5f7f5
}