Page 1 of 1
section alignment problem (visual c++)
Posted: Mon Aug 20, 2012 1:53 am
by mordak
hi!
i develop my kernel and now want to enable pagin for it.when i set section alignment
from 512 to 4096 size of kernel reduce from 9kb to 5kb and when browse it with hex editor its not page aligned and aligned as 1024
Re: section alignment problem (visual c++)
Posted: Mon Aug 20, 2012 12:15 pm
by mordak
hi!
this answer that i found hopeful to useful
in visual stdio section alignment effect file alignment.
i quote its from [url]thishttp://www.catch22.net/tuts/reducing-executable-size[/url]
/Align
Specifies the alignment of each section in the executable, when it is mapped into memory. Has no relation to file-alignment (above), but an apparent bug in visual studio causes this option to also effect file-section alignment, as well as the intended image-section alignment, under certain circumstances
in this state you must set FileAlignment with Undocumented linker options
/FILEALIGN
Undocumented (VC 6 only). Specified the alignment of each section in the executable, as it is stored on disk
its work for me.
Re: section alignment problem (visual c++)
Posted: Tue Aug 21, 2012 2:29 pm
by JAAman
what do you mean its undocumented?
the official visual studio reference:
http://msdn.microsoft.com/en-us/library ... 10%29.aspx
and seriously, quoting a document that considers VC6 to be the latest...even VC6's replacement's replacement's replacement has been replaced by now