Page 1 of 1

Do not understand error message

Posted: Sun Jan 20, 2008 2:56 pm
by Rick
Win32 device driver, 14KB, compiled with WDK 6000, using sections :

.text
.rdata
.idata
PAGE
INIT

DriverEntry() is in INIT section, several pageable functions are in PAGE section.

In VMProtect 1.61, I choose to protect 11 functions (from 102) and 9 Unicode strings (from 9). When I click on Compile I get Dialog :

'Section ".text" is in the field of creation of heading of new section'

What does the error mean and how can I fix the problem please?

Thank you

Posted: Sun Jan 20, 2008 3:09 pm
by Admin
You should increase the value of alignment for sections in the settings of your compiler.

Posted: Sun Jan 20, 2008 3:50 pm
by Rick
Thank you. I am having trouble finding how to do that for a driver. I have tried adding :

LINKER_FLAGS =$(LINKER_FLAGS) -ALIGN:8192

to the SOURCES file, but it made no difference to the size of the .sys or to the problem.

Posted: Sun Jan 20, 2008 4:58 pm
by Admin

Posted: Sun Jan 20, 2008 5:17 pm
by Rick
Yes, thanks, that is for VC. I am compiling a device driver with WDK/DDK, so it doesn't apply.

Thanks anyhow.

Later... I have found the answer. Add the following line to the SOURCES file :

DRIVER_ALIGNMENT=0x200

to set the section alignment to 512bytes in that example.