This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

global variables in C++ in .data


Hi,
 
When I put global variables in a C++ file and compile em with gcc they
are put in the .data section. In my case this means ROM so not a place
where you want your variables to be. Does anyone know how to get these
globals in the .bss section ? If I rename the file to .C the variable is put
in the .bss section, just as I would expect.
 
Thanks !!
 
Michel van Elk
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]