This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Named sections.
- To: gcc-help at gcc dot gnu dot org
- Subject: Named sections.
- From: Nick Palmer <nicholas at slackers dot net>
- Date: Wed, 31 Jan 2001 21:38:47 -0700
Is there an easy way with gcc to name the .data and .bss sections for a
particular file something else. I am working on a project where it is
required that we be able to do this so that we can separate some .data
sections and some .bss sections from others. The only solutions I have
found to date are the .section assembler directive and using a linker
script with all of the file names. Both are very hard to maintain. What I
am looking for is a command line option at compile time, or a #pragma that
would do this for us. I have worked with several other tool chains that
have this feature, and would be disappointed to learn that this feature has
not yet been implemented with gcc.
Thanks for your time,
Nick