// Global variables do not have any '.' in their names.
// These are maily function names and global variable names.
// Example - @foo, @i
+ // Static local variables - @<func>.<var>
// -------------------------------------------------------
// Functions and auto variables.
// Names are mangled as <prefix><funcname>.<tag>.<varname>
// SECTION Names
// uninitialized globals - @udata.<num>.#
// initialized globals - @idata.<num>.#
+ // Program memory data - @romdata.#
+ // Variables with user defined section name - <user_defined_section>
+ // Variables with user defined address - @<var>.user_section.<address>.#
// Function frame - @<func>.frame_section.
// Function autos - @<func>.autos_section.
+ // Overlay sections - @<color>.##
// Declarations - Enclosed in comments. No section for them.
//----------------------------------------------------------
return "romdata.#";
}
+ static std::string getSharedUDataSectionName() {
+ std::ostringstream o;
+ o << getTagName(PREFIX_SYMBOL) << "udata_shr" << ".#";
+ return o.str();
+ }
+
static std::string getRomdataSectionName(unsigned num,
std::string prefix = "") {
std::ostringstream o;
}
}
}
+
+ /// Return Overlay Name for the section.
+ /// The ABI Convention is: @<Color>.##.<section_tag>
+ /// The section_tag is retrieved from the SectName parameter and
+ /// and Color is passed in parameter.
+ static inline std::string getOverlayName(std::string SectName, int Color) {
+ // FIXME: Only autos_section and frame_section are colored.
+ // So check and assert if the passed SectName does not have AUTOS_SECTION
+ // or FRAME_SECTION tag in it.
+ std::ostringstream o;
+ o << getTagName(PREFIX_SYMBOL) << Color << ".##"
+ << SectName.substr(SectName.find("."));
+
+ return o.str();
+ }
}; // class PAN.
} // end namespace llvm;