summaryrefslogtreecommitdiff
path: root/gcc/config/i386/i386.c
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-26 10:06:16 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-26 10:06:16 +0000
commit97920c79a856f8fc7b282910368301a2effb7c9d (patch)
tree6a96a7402ecf753faa8bc79527b942906023d5f3 /gcc/config/i386/i386.c
parent26b4c68d2bd67a745f034b4bd1f32637a671dea0 (diff)
downloadgcc-97920c79a856f8fc7b282910368301a2effb7c9d.tar.gz
Support .lbss etc. sections with Solaris as (PR target/59407)
PR target/59407 * config/i386/i386.c (SECTION_LARGE): Define. (x86_64_elf_select_section): Set it for large data/bss sections. Only clear SECTION_WRITE for .lrodata. (x86_64_elf_section_type_flags): Set SECTION_LARGE for large data/bss sections. * config/i386/sol2.h (MACH_DEP_SECTION_ASM_FLAG): Define. * varasm.c (default_elf_asm_named_section): Grow flagchars. [MACH_DEP_SECTION_ASM_FLAG] Emit MACH_DEP_SECTION_ASM_FLAG for SECTION_MACH_DEP. * doc/tm.texi.in (Sections, MACH_DEP_SECTION_ASM_FLAG): Describe. * doc/tm.texi: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235434 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r--gcc/config/i386/i386.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index e7adbd539e8..8495e0ad8c3 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -6490,6 +6490,9 @@ ix86_in_large_data_p (tree exp)
return false;
}
+/* i386-specific section flag to mark large sections. */
+#define SECTION_LARGE SECTION_MACH_DEP
+
/* 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
@@ -6502,7 +6505,7 @@ x86_64_elf_select_section (tree decl, int reloc,
if (ix86_in_large_data_p (decl))
{
const char *sname = NULL;
- unsigned int flags = SECTION_WRITE;
+ unsigned int flags = SECTION_WRITE | SECTION_LARGE;
switch (categorize_decl_for_section (decl, reloc))
{
case SECCAT_DATA:
@@ -6529,7 +6532,7 @@ x86_64_elf_select_section (tree decl, int reloc,
case SECCAT_RODATA_MERGE_STR_INIT:
case SECCAT_RODATA_MERGE_CONST:
sname = ".lrodata";
- flags = 0;
+ flags &= ~SECTION_WRITE;
break;
case SECCAT_SRODATA:
case SECCAT_SDATA:
@@ -6564,6 +6567,9 @@ x86_64_elf_section_type_flags (tree decl, const char *name, int reloc)
{
unsigned int flags = default_section_type_flags (decl, name, reloc);
+ if (ix86_in_large_data_p (decl))
+ flags |= SECTION_LARGE;
+
if (decl == NULL_TREE
&& (strcmp (name, ".ldata.rel.ro") == 0
|| strcmp (name, ".ldata.rel.ro.local") == 0))