summaryrefslogtreecommitdiff
path: root/gcc/output.h
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-31 09:12:34 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-31 09:12:34 +0000
commit43e4a084f6bba2151bbad13a71324ecf18957a10 (patch)
tree87b4af46aac16d4fea8bf9447284ab5f9c4ceba0 /gcc/output.h
parenta74f1f7469830d0a6c3865a33ab0eab75737967a (diff)
downloadgcc-43e4a084f6bba2151bbad13a71324ecf18957a10.tar.gz
* output.h (enum section_category): Export from varasm.c
(categorize_decl_for_section): Likewise. * varasm.c (enum section_category): Kill. (categorize_decl_for_section): Make global. * i386-protos.h (x86_output_aligned_bss, x86_elf_aligned_common): Declare. * i386.c (ix86_section_threshold): New static variable. (ix86_in_large_data_p, ix86_encode_section_info, x86_64_elf_unique_section, x86_64_elf_select_section): New functions. (TARGET_ENCODE_SECTION_INFO): Define (override_options): Enable medium model for PIC. (ix86_expand_prologue): Expand gen_set_got_rex64. (legitimate_constant_p): Handle new UNSPECs. (legitimate_pic_address_disp_p): Likewise. (legitimize_pic_address): Lower MEDIUM model addressing. * i386.h (PIC_OFFSET_TABLE_REGNUM): Set for medium model PIC. (enum cmodel): Add MEDIUM_PIC. (SYMBOL_REF_FAR_ADDR_P): New macro. (SYMBOL_FLAG_FAR_ADDR): New flag. * i386.md (movdi): Support medium model. (set_got_rex64): New pattern. * i386.opt (mlarge-data-threshold): New flag. * predicates.md (zext_operand/sext_operand): Deal with medium model. * x86-64.h (ASM_OUTPUT_ALIGNED_BSS): Use x86_output_aligned_bss. (ASM_OUTPUT_ALIGNED_COMMON, TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * invoke.texi (-mlarge_data_threshold): Document git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102606 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/output.h')
-rw-r--r--gcc/output.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc/output.h b/gcc/output.h
index 221e4df1850..c0dfb5fd1c4 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -500,6 +500,44 @@ extern void no_asm_to_stream (FILE *);
#define SECTION_NOTYPE 0x80000 /* don't output @progbits */
#define SECTION_MACH_DEP 0x100000 /* subsequent bits reserved for target */
+/* A helper function for default_elf_select_section and
+ default_elf_unique_section. Categorizes the DECL. */
+
+enum section_category
+{
+ SECCAT_TEXT,
+
+ SECCAT_RODATA,
+ SECCAT_RODATA_MERGE_STR,
+ SECCAT_RODATA_MERGE_STR_INIT,
+ SECCAT_RODATA_MERGE_CONST,
+ SECCAT_SRODATA,
+
+ SECCAT_DATA,
+
+ /* To optimize loading of shared programs, define following subsections
+ of data section:
+ _REL Contains data that has relocations, so they get grouped
+ together and dynamic linker will visit fewer pages in memory.
+ _RO Contains data that is otherwise read-only. This is useful
+ with prelinking as most relocations won't be dynamically
+ linked and thus stay read only.
+ _LOCAL Marks data containing relocations only to local objects.
+ These relocations will get fully resolved by prelinking. */
+ SECCAT_DATA_REL,
+ SECCAT_DATA_REL_LOCAL,
+ SECCAT_DATA_REL_RO,
+ SECCAT_DATA_REL_RO_LOCAL,
+
+ SECCAT_SDATA,
+ SECCAT_TDATA,
+
+ SECCAT_BSS,
+ SECCAT_SBSS,
+ SECCAT_TBSS
+};
+
+
extern bool set_named_section_flags (const char *, unsigned int);
#define named_section_flags(NAME, FLAGS) \
named_section_real((NAME), (FLAGS), /*decl=*/NULL_TREE)
@@ -510,6 +548,7 @@ extern unsigned int default_section_type_flags_1 (tree, const char *, int, int);
extern void default_no_named_section (const char *, unsigned int, tree);
extern void default_elf_asm_named_section (const char *, unsigned int, tree);
+extern enum section_category categorize_decl_for_section (tree, int, int);
extern void default_coff_asm_named_section (const char *, unsigned int, tree);
extern void default_pe_asm_named_section (const char *, unsigned int, tree);