J
junky_fellow
Guys,
I am using a library that has some global variables.
static const int libGlobal1;
static const int libGlobal2;
There are some functions in this library that use these global
variables and some functions that don't use these them.
My question is, if I link my application to some function that does
not use any of the global variable, will the global variables of this
library be a part of my data section. (consider a unix system that
uses elf as object file format).
Or the global variables will always become a part of my data section,
whenever I link with any function of the library.
What about the static variables defined inside a library function ?
I am using a library that has some global variables.
static const int libGlobal1;
static const int libGlobal2;
There are some functions in this library that use these global
variables and some functions that don't use these them.
My question is, if I link my application to some function that does
not use any of the global variable, will the global variables of this
library be a part of my data section. (consider a unix system that
uses elf as object file format).
Or the global variables will always become a part of my data section,
whenever I link with any function of the library.
What about the static variables defined inside a library function ?