hey i m reading about pe format but there something that i don't get RVA in documentation it says it just like a temp for addressing memory in other sections ok and it's just a DWORD what if there are many temperoralily variables wouldnt that overflow the that RVA value or i got the concenpt of RVA values all wrong ???

RVAs work like the segmented addresses. In the segmented memory model you have segments and offsets that combine to give the final address. An RVA is the offset that is combined to the PE's base address when loaded into memory.

what if there are many temperoralily variables wouldnt that overflow the that RVA value or i got the concenpt of RVA values all wrong ???

I do not know the answer, but if you use enough RVAs at the same time to fill up a DWORD without running out of some other critical resource first, I assume the code will not build. I do not think this is a risk that you should worry about.

but aren't RVA is on load time ? so code will be build but will crash ? or it's alrdy there when exe compiles ?

Edited 7 Years Ago by MrNoob: n/a

but aren't RVA is on load time ? so code will be build but will crash ?

RVAs are converted to real addresses when the PE is loaded into memory by combining the PE base address with the RVA. The RVAs themselves are generated at build time for the executable. What happens depends on whether or not an overflow test is in place. If it is in place, the code will fail to build. If it is not in place, the code would probably build and load, but exhibit unpredictable behavior because the DWORD wrapped around and two variables have the same address. I have never heard of either problem happening, and that is why I think it is so rare as to be a non-issue.

This question has already been answered. Start a new discussion instead.