Hello driver devs… I’ve been away for a while, but now I’m back.
Maybe this should be in the NTFSD forum, please advise if so.
I just installed WDK 6000. In my FSD I used to have the following macros defined, and they were used extensively (by the previous author of this FSD).
#define INIT_CODE_SECTION(f) alloc_text(INIT,f)
#define PAGE_CODE_SECTION(f) alloc_text(PAGE,f)
#define LOCK_CODE_SECTION(f) alloc_text(_TEXT,f)
#define INIT_DATA_SECTION data_seg (“_INIT”)
#define PAGE_DATA_SECTION data_seg (“_PAGE”)
#define LOCK_DATA_SECTION data_seg (“.data”)
If these are defined, I get link errors similar to the following:
Linking Executable - objchk_wnet_x86\i386\rfsfsd.sys errors in directory c:\projects\rfs\rfsfsd link : error LNK1218: warning treated as error; no output file generated
Which boils down to:
link : warning LNK4254: section ‘_PAGE’ (C0000040) merged into ‘PAGE’ (60000020) with different attributes
So I looked around in fastfat, and could find no such pragmas. After redefining these macros to do nothing, the driver compiles again.
I think I basically understand that this technique is to conserver kernel memory, but fastfat is a lot bigger than my driver, so I figure that I dont need this logic either.
Is this a safe assumption? What changed between the ddk (3790.1830) and WDK 6000, with regards to this? Should I not have used these pragmas/macros in previous builds?
What the heck is going on?
TIA
GAP
_PAGE is wrong. Pageable section names must start with PAGE, not _PAGE.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntdev…
> Hello driver devs… I’ve been away for a while, but now I’m back.
>
> Maybe this should be in the NTFSD forum, please advise if so.
>
> I just installed WDK 6000. In my FSD I used to have the following macros
defined, and they were used extensively (by the previous author of this FSD).
>
> #define INIT_CODE_SECTION(f) alloc_text(INIT,f)
> #define PAGE_CODE_SECTION(f) alloc_text(PAGE,f)
> #define LOCK_CODE_SECTION(f) alloc_text(_TEXT,f)
>
> #define INIT_DATA_SECTION data_seg (“_INIT”)
> #define PAGE_DATA_SECTION data_seg (“_PAGE”)
> #define LOCK_DATA_SECTION data_seg (“.data”)
>
> If these are defined, I get link errors similar to the following:
>
> Linking Executable - objchk_wnet_x86\i386\rfsfsd.sys errors in directory
c:\projects\rfs\rfsfsd link : error LNK1218: warning treated as error; no
output file generated
>
> Which boils down to:
>
> link : warning LNK4254: section ‘_PAGE’ (C0000040) merged into ‘PAGE’
(60000020) with different attributes
>
> So I looked around in fastfat, and could find no such pragmas. After
redefining these macros to do nothing, the driver compiles again.
>
> I think I basically understand that this technique is to conserver kernel
memory, but fastfat is a lot bigger than my driver, so I figure that I dont
need this logic either.
>
> Is this a safe assumption? What changed between the ddk (3790.1830) and WDK
6000, with regards to this? Should I not have used these pragmas/macros in
previous builds?
> What the heck is going on?
>
> TIA
>
> GAP
>
>
>
That must have just changed, because this code has been in place for a
while.
“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> _PAGE is wrong. Pageable section names must start with PAGE, not _PAGE.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> wrote in message news:xxxxx@ntdev…
>> Hello driver devs… I’ve been away for a while, but now I’m back.
>>
>> Maybe this should be in the NTFSD forum, please advise if so.
>>
>> I just installed WDK 6000. In my FSD I used to have the following macros
> defined, and they were used extensively (by the previous author of this
> FSD).
>>
>> #define INIT_CODE_SECTION(f) alloc_text(INIT,f)
>> #define PAGE_CODE_SECTION(f) alloc_text(PAGE,f)
>> #define LOCK_CODE_SECTION(f) alloc_text(_TEXT,f)
>>
>> #define INIT_DATA_SECTION data_seg (“_INIT”)
>> #define PAGE_DATA_SECTION data_seg (“_PAGE”)
>> #define LOCK_DATA_SECTION data_seg (“.data”)
>>
>> If these are defined, I get link errors similar to the following:
>>
>> Linking Executable - objchk_wnet_x86\i386\rfsfsd.sys errors in directory
> c:\projects\rfs\rfsfsd link : error LNK1218: warning treated as error; no
> output file generated
>>
>> Which boils down to:
>>
>> link : warning LNK4254: section ‘_PAGE’ (C0000040) merged into ‘PAGE’
> (60000020) with different attributes
>>
>> So I looked around in fastfat, and could find no such pragmas. After
> redefining these macros to do nothing, the driver compiles again.
>>
>> I think I basically understand that this technique is to conserver kernel
> memory, but fastfat is a lot bigger than my driver, so I figure that I
> dont
> need this logic either.
>>
>> Is this a safe assumption? What changed between the ddk (3790.1830) and
>> WDK
> 6000, with regards to this? Should I not have used these pragmas/macros
> in
> previous builds?
>> What the heck is going on?
>>
>> TIA
>>
>> GAP
>>
>>
>>
>
>
That makes no difference, Max. Thanks anyway. Problem not solved. Oh
well.
“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> _PAGE is wrong. Pageable section names must start with PAGE, not _PAGE.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> wrote in message news:xxxxx@ntdev…
>> Hello driver devs… I’ve been away for a while, but now I’m back.
>>
>> Maybe this should be in the NTFSD forum, please advise if so.
>>
>> I just installed WDK 6000. In my FSD I used to have the following macros
> defined, and they were used extensively (by the previous author of this
> FSD).
>>
>> #define INIT_CODE_SECTION(f) alloc_text(INIT,f)
>> #define PAGE_CODE_SECTION(f) alloc_text(PAGE,f)
>> #define LOCK_CODE_SECTION(f) alloc_text(_TEXT,f)
>>
>> #define INIT_DATA_SECTION data_seg (“_INIT”)
>> #define PAGE_DATA_SECTION data_seg (“_PAGE”)
>> #define LOCK_DATA_SECTION data_seg (“.data”)
>>
>> If these are defined, I get link errors similar to the following:
>>
>> Linking Executable - objchk_wnet_x86\i386\rfsfsd.sys errors in directory
> c:\projects\rfs\rfsfsd link : error LNK1218: warning treated as error; no
> output file generated
>>
>> Which boils down to:
>>
>> link : warning LNK4254: section ‘_PAGE’ (C0000040) merged into ‘PAGE’
> (60000020) with different attributes
>>
>> So I looked around in fastfat, and could find no such pragmas. After
> redefining these macros to do nothing, the driver compiles again.
>>
>> I think I basically understand that this technique is to conserver kernel
> memory, but fastfat is a lot bigger than my driver, so I figure that I
> dont
> need this logic either.
>>
>> Is this a safe assumption? What changed between the ddk (3790.1830) and
>> WDK
> 6000, with regards to this? Should I not have used these pragmas/macros
> in
> previous builds?
>> What the heck is going on?
>>
>> TIA
>>
>> GAP
>>
>>
>>
>
>