This is the mail archive of the gcc@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]
Other format: [Raw text]

gcc puts .data and .bss symbols in .text segment.


I'm currently wriring on a tool to convert between OMF and COFF object file formats. Doing so i have stumbled upon something rather strange in the object output from the gcc compiler. Gcc puts symbols that should be in .data or .bss into the .text segment instead. Why does Gcc do this, and is this even allowed? I mean IIRC the CS segment is read-only. Other compilers like borland for instance put initialized and unititialized data in their respective segments. How does one tell if a symbol is code, bss or data??? I am using gcc 3.2.x.

Note: I am not subscribed to this mailinglist so please CC me any answers. Thanks!

--
One OS to rule them all,
one OS to find them,
one OS to bring them all
and in the darkness bind them.




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