Yes it failed... because none of the variables in the section are used in your trial run...
If I do this...
BOOL APIENTRY DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
hdll = hInstDLL;
break;
Now, the section is created because hdll is a variable in that section.
Going back to your original example at the top of the thread ... first I would lose the . and just call it "shared" or "mydata" or such... second, if you assign a value (i.e. make a reference to) to either or both of your variables you should see that the section is created. The problem is most likely part of the optimization scheme, unreferenced variables are not included in final programs and empty sections are not retained by the linker.