This is the mail archive of the
mailing list for the GCC project.
Adding new section attribute
- From: "Mohamed Shafi" <shafitvm at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 11 Mar 2008 18:42:58 +0530
- Subject: Adding new section attribute
For a gcc port i need to add new section. This new section has both
the variations i.e initialized and uninitialized say .sbss and .sdata
After going through the internals this is what i understood
1. Only one section attribute is need. Depending on whether the
variable is initialized or not the variable can be placed in .sdata or
2. For .sdata we need to define EXTRA_SECTIONS and
EXTRA_SECTION_FUNCTIONS. The variable should be handled in the target
macro TARGET_ASM_SELECT_SECTION by looking for the attribute value.
3. For .sbss we need to handle the variable in the macro
ASM_OUTPUT_BSS, again by looking for the attribute value. For .sbss
section there is no need to define EXTRA_SECTIONS and
Can anyone please confirm this?