Full syntax is:
__declspec(allocate("segname")) declarator
So it applies only to declaration that follows, in your case only g_pROData
is affected and allocated in segment named .readonly
. If more that one variable needs to be allocated in that segment then you have to repeat declaration for each one.