diff options
author | Jan Hubicka <jh@suse.cz> | 2001-11-28 10:47:25 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-11-28 09:47:25 +0000 |
commit | db4a825457efe5f2b71281fa17f59ce2d7c65a6d (patch) | |
tree | 97187b5417e7845f32035f0c7bc2cd22abcfb809 /gcc/config/elfos.h | |
parent | 562d21e913afeb56dced1b60fdfe6ff09a2fbf23 (diff) | |
download | gcc-db4a825457efe5f2b71281fa17f59ce2d7c65a6d.tar.gz |
cse.c (true_dependence_in_rtx): New function.
* cse.c (true_dependence_in_rtx): New function.
(invalidate): Use it.
* c-common.h (GOTO_FAKE_P): New macro.
* tree-inline.c (GOTO_FAKE_P): Set.
* c-tree.texi (GOTO_FAKE_P): Document.
* varasm.c (assemble_variable): Set reloc to 3 for error_mark
containing pointers.
(output_addressed_constants): Check for local/external relocations.
* elfos.h (SELECT_SECTION): Classify data section.
* tm.texi (SELECT_SECTION): Update documentation.
* cfganal.c (flow_dfs_compute_reverse_add_bb): set visited bit.
(flow_dfs_compute_reverse_execute): Add only unvisited blocks.
From-SVN: r47405
Diffstat (limited to 'gcc/config/elfos.h')
-rw-r--r-- | gcc/config/elfos.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h index a5c7a710e31..503e141d778 100644 --- a/gcc/config/elfos.h +++ b/gcc/config/elfos.h @@ -352,7 +352,23 @@ 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. */ + the initial value of DECL requires link-time relocations. + + To optimize loading of shared programs, define following subsections + of data section by attaching: + + .rel + Section with this string in name contains data that do have + relocations, so they get grouped together and dynamic linker + will visit fewer pages in memory. + .ro + Marks data read only otherwise. This is usefull with prelinking + as most of relocations won't be dynamically linked and thus + stay read only. + .local + Marks data containing relocations only to local objects. These + relocation will get fully resolved by prelinking. + */ #undef SELECT_SECTION #define SELECT_SECTION(DECL, RELOC, ALIGN) \ @@ -366,12 +382,22 @@ const_section () \ } \ else if (TREE_CODE (DECL) == VAR_DECL) \ { \ - if ((flag_pic && RELOC) \ - || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \ + if (!TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \ || !DECL_INITIAL (DECL) \ || (DECL_INITIAL (DECL) != error_mark_node \ && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \ - data_section (); \ + { \ + if (flag_pic && ((RELOC) & 2)) \ + named_section (NULL_TREE, ".data.rel", RELOC); \ + else if (flag_pic && (RELOC)) \ + named_section (NULL_TREE, ".data.rel.local", RELOC);\ + else \ + data_section (); \ + } \ + else if (flag_pic && ((RELOC) & 2)) \ + named_section (NULL_TREE, ".data.rel.ro", RELOC); \ + else if (flag_pic && (RELOC)) \ + named_section (NULL_TREE, ".data.rel.ro.local", RELOC); \ else if (flag_merge_constants < 2) \ /* C and C++ don't allow different variables to share \ the same location. -fmerge-all-constants allows \ |