Adding new section attribute
Mohamed Shafi
shafitvm@gmail.com
Tue Mar 11 13:55:00 GMT 2008
Hello all,
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
.sbss
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
EXTRA_SECTION_FUNCTIONS
Can anyone please confirm this?
Regards,
Shafi
More information about the Gcc
mailing list