microsoft / microsoft-pdb

Information from Microsoft about the PDB format. We'll try to keep this up to date. Just trying to help the CLANG/LLVM community get onto Windows.
Other
1.85k stars 271 forks source link

Address of first section in Section Map substream #53

Open ent0m0l0gist opened 3 years ago

ent0m0l0gist commented 3 years ago

The section map substream has lengths of each section, which allows us to cumulatively add and get the address of the sections. But, the length of first section (0th) is not there. I used to assume the length to be 0x1000, and hence, the address of first section as 0x1000. But in some PDB files, i have seen it to be 0x2000.

Where in the PDB file is this information mentioned?

skochinsky commented 3 years ago

IIRC section numbers are 1-based (CodeView convention)

ent0m0l0gist commented 3 years ago

Thank you for pointing me to the thread. The first section I understand is .text

If I use cvdump to view the virtual address of sections, on some files the address for .text is 0x1000 and for some it is 0x2000.

Can you help me out with where in pdb I can find this information? What is the "imagebase" for the pdb? (If that is the correct terminology)