Resolving RVA's for Import and Export tables within a PE file

前端 未结 3 718
别跟我提以往
别跟我提以往 2020-12-31 12:56

I am currently writing a PE parser/loader. I have successfully loaded the PE file into memory using standard c file io, retrieved valid DOS and PE headers (the optional head

3条回答
  •  攒了一身酷
    2020-12-31 13:33

    Not all PE images will have an export directory table. You need to check the optional header's Windows-specific "NumberOfRvaAndSizes" field. If it is less than or equal to IMAGE_DIRECTORY_ENTRY_EXPORT (0), then there is no export directory table (i.e. there is nothing valid located at ioh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT]).

    See the answer to this question for an example.

提交回复
热议问题