diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2012-02-20 11:47:25 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2012-02-20 11:47:25 +0000 |
commit | e992fc2e5d6ece7463384caa8c1e0a70cfe57e91 (patch) | |
tree | a77f9137c76c7d39fcac1110b79efb90d3a95ab7 /gcc/varasm.c | |
parent | d150390867de8dc4c2405ffc764ada207e0fd48f (diff) | |
download | gcc-e992fc2e5d6ece7463384caa8c1e0a70cfe57e91.tar.gz |
Enable initfini array support on Solaris (PR target/50166)
* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Require gcc_SUN_LD_VERSION.
Define _start.
Remove -e 0 from $gcc_cv_ld invocation.
Only use __GLIBC_PREREQ if defined.
Enable on Solaris since Solaris 8 patch.
(gcc_SUN_LD_VERSION): New macro.
* configure.ac (ld_ver) <*-*-solaris2*>: Refer to
gcc_SUN_LD_VERSION for version number format.
* configure: Regenerate.
* varasm.c (get_elf_initfini_array_priority_section): Set
SECTION_NOTYPE for non-default priority.
Use get_section instead of get_unnamed_section to emit
.init_array/.fini_array with default priority.
From-SVN: r184390
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 86134672cbe..79c81fa7991 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -7658,7 +7658,7 @@ get_elf_initfini_array_priority_section (int priority, sprintf (buf, "%s.%.5u", constructor_p ? ".init_array" : ".fini_array", priority); - sec = get_section (buf, SECTION_WRITE, NULL_TREE); + sec = get_section (buf, SECTION_WRITE | SECTION_NOTYPE, NULL_TREE); } else { @@ -7666,16 +7666,16 @@ get_elf_initfini_array_priority_section (int priority, { if (elf_init_array_section == NULL) elf_init_array_section - = get_unnamed_section (0, output_section_asm_op, - "\t.section\t.init_array"); + = get_section (".init_array", + SECTION_WRITE | SECTION_NOTYPE, NULL_TREE); sec = elf_init_array_section; } else { if (elf_fini_array_section == NULL) elf_fini_array_section - = get_unnamed_section (0, output_section_asm_op, - "\t.section\t.fini_array"); + = get_section (".fini_array", + SECTION_WRITE | SECTION_NOTYPE, NULL_TREE); sec = elf_fini_array_section; } } |