-#define UNIQUE_SECTION_P(DECL) (DECL_ONE_ONLY (DECL))
-
-#define UNIQUE_SECTION(DECL, RELOC) \
- do \
- { \
- int len; \
- int sec; \
- const char *name; \
- char *string; \
- const char *prefix; \
- static const char *prefixes[/*4*/3][2] = \
- { \
- { ".text.", ".gnu.linkonce.t." }, \
- { ".rodata.", ".gnu.linkonce.r." }, \
- { ".data.", ".gnu.linkonce.d." } \
- /* Do not generate unique sections for uninitialised \
- data since we do not have support for this in the \
- linker scripts yet... \
- ,{ ".bss.", ".gnu.linkonce.b." } */ \
- }; \
- \
- if (TREE_CODE (DECL) == FUNCTION_DECL) \
- sec = 0; \
- /* else if (DECL_INITIAL (DECL) == 0 \
- || DECL_INITIAL (DECL) == error_mark_node) \
- sec = 3; */ \
- else if (DECL_READONLY_SECTION (DECL, RELOC)) \
- sec = 1; \
- else \
- sec = 2; \
- \
- name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \
- /* Strip off any encoding in name. */ \
- STRIP_NAME_ENCODING (name, name); \
- prefix = prefixes[sec][DECL_ONE_ONLY(DECL)]; \
- len = strlen (name) + strlen (prefix); \
- string = alloca (len + 1); \
- \
- sprintf (string, "%s%s", prefix, name); \
- \
- DECL_SECTION_NAME (DECL) = build_string (len, string); \
- } \
- while (0)
-
-/* A C statement (sans semicolon) to output an
- element in the table of global constructors. */
-#define ASM_OUTPUT_CONSTRUCTOR(FILE, NAME) \
- do \
- { \
- ctors_section (); \
- fprintf (FILE, "%s", INT_ASM_OP); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n"); \
- } \
- while (0)
-
-/* A C statement (sans semicolon) to output an
- element in the table of global destructors. */
-#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
- do \
- { \
- dtors_section (); \
- fprintf (FILE, "%s", INT_ASM_OP); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n"); \
- } \
- while (0)
-
-/* Switch into a generic section.
-
- We make the section read-only and executable for a function decl,
- read-only for a const data decl, and writable for a non-const data decl.
-
- If the section has already been defined, we must not
- emit the attributes here. The SVR4 assembler does not
- recognize section redefinitions.
- If DECL is NULL, no attributes are emitted. */
-
-#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \
- do \
- { \
- static htab_t htab; \
- \
- struct section_info \
- { \
- enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type; \
- }; \
- \
- struct section_info *s; \
- const char *mode; \
- enum sect_enum type; \
- PTR* slot; \
- \
- /* The names we put in the hashtable will always be the unique \
- versions gived to us by the stringtable, so we can just use \
- their addresses as the keys. */ \
- if (!htab) \
- htab = htab_create (31, \
- htab_hash_pointer, \
- htab_eq_pointer, \
- NULL); \
- \
- if (DECL && TREE_CODE (DECL) == FUNCTION_DECL) \
- type = SECT_EXEC, mode = "ax"; \
- else if (DECL && DECL_READONLY_SECTION (DECL, RELOC)) \
- type = SECT_RO, mode = "a"; \
- else \
- type = SECT_RW, mode = "aw"; \
- \
- \
- /* See if we already have an entry for this section. */ \
- slot = htab_find_slot (htab, NAME, INSERT); \
- if (!*slot) \
- { \
- s = (struct section_info *) xmalloc (sizeof (* s)); \
- s->type = type; \
- *slot = s; \
- fprintf (FILE, "\t.section\t%s,\"%s\",@progbits\n", \
- NAME, mode); \
- } \
- else \
- { \
- s = (struct section_info *) *slot; \
- if (DECL && s->type != type) \
- error_with_decl (DECL, \
- "%s causes a section type conflict"); \
- \
- fprintf (FILE, "\t.section\t%s\n", NAME); \
- } \
- } \
- while (0)
-
-/* A C statement or statements to switch to the appropriate
- section for output of RTX in mode MODE. RTX is some kind
- of constant in RTL. The argument MODE is redundant except
- in the case of a `const_int' rtx. Currently, these always
- go into the const section. */
-
-#undef SELECT_RTX_SECTION
-#define SELECT_RTX_SECTION(MODE, RTX) const_section ()
-
-/* A C statement or statements to switch to the appropriate
- section for output of DECL. DECL is either a `VAR_DECL' node
- or a constant of some sort. RELOC indicates whether forming
- the initial value of DECL requires link-time relocations. */