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]

Adding new section attribute


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


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