Hello, @Vd3
what is newRVA and oldRVA?
From PE Format,
RVA: In an image file, this is the address of an item after it is loaded into memory, with the base address of the image file subtracted from it. The RVA of an item almost always differs from its position within the file on disk (file pointer).
In an object file, an RVA is less meaningful because memory locations are not assigned. In this case, an RVA would be an address within a section (described later in this table), to which a relocation is later applied during linking. For simplicity, a compiler should just set the first RVA in each section to zero.
The link you provided also explain,
oldRVA - rva where rsrc placed in current image.
newRVA - rva where rsrc will be placed in new image.
but I cannot figure out what the Delta (third parameter) is,
Actually, Delta is newRVA - oldRVA
Because RtlPointerToOffset returns the offset from a given base address of a given pointer.
You can pass newRVA
into the CopyRSRC
function to get Delta
.
----------
Thank you!
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.