re PR target/58218 (-mcmodel=medium cause assembler warning "ignoring incorrect section type for .lbss")

PR target/58218
	* config/i386/x86-64.h (TARGET_SECTION_TYPE_FLAGS): Define.
	* config/i386/i386.c (x86_64_elf_section_type_flags): New function.

	* gcc.target/i386/pr58218.c: New test.

From-SVN: r201938
This commit is contained in:
Jakub Jelinek 2013-08-23 11:57:44 +02:00 committed by Jakub Jelinek
parent e500c62a86
commit 520a5868fa
5 changed files with 39 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2013-08-23 Jakub Jelinek <jakub@redhat.com>
PR target/58218
* config/i386/x86-64.h (TARGET_SECTION_TYPE_FLAGS): Define.
* config/i386/i386.c (x86_64_elf_section_type_flags): New function.
2013-08-23 Kirill Yukhin <kirill.yukhin@intel.com> 2013-08-23 Kirill Yukhin <kirill.yukhin@intel.com>
* gcc/config/i386/predicates.md (ext_sse_reg_operand): New. * gcc/config/i386/predicates.md (ext_sse_reg_operand): New.

View File

@ -4912,6 +4912,28 @@ x86_64_elf_select_section (tree decl, int reloc,
return default_elf_select_section (decl, reloc, align); return default_elf_select_section (decl, reloc, align);
} }
/* Select a set of attributes for section NAME based on the properties
of DECL and whether or not RELOC indicates that DECL's initializer
might contain runtime relocations. */
static unsigned int ATTRIBUTE_UNUSED
x86_64_elf_section_type_flags (tree decl, const char *name, int reloc)
{
unsigned int flags = default_section_type_flags (decl, name, reloc);
if (decl == NULL_TREE
&& (strcmp (name, ".ldata.rel.ro") == 0
|| strcmp (name, ".ldata.rel.ro.local") == 0))
flags |= SECTION_RELRO;
if (strcmp (name, ".lbss") == 0
|| strncmp (name, ".lbss.", 5) == 0
|| strncmp (name, ".gnu.linkonce.lb.", 16) == 0)
flags |= SECTION_BSS;
return flags;
}
/* Build up a unique section name, expressed as a /* Build up a unique section name, expressed as a
STRING_CST node, and assign it to DECL_SECTION_NAME (decl). STRING_CST node, and assign it to DECL_SECTION_NAME (decl).
RELOC indicates whether the initial value of EXP requires RELOC indicates whether the initial value of EXP requires

View File

@ -103,3 +103,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#undef TARGET_ASM_UNIQUE_SECTION #undef TARGET_ASM_UNIQUE_SECTION
#define TARGET_ASM_UNIQUE_SECTION x86_64_elf_unique_section #define TARGET_ASM_UNIQUE_SECTION x86_64_elf_unique_section
#undef TARGET_SECTION_TYPE_FLAGS
#define TARGET_SECTION_TYPE_FLAGS x86_64_elf_section_type_flags

View File

@ -1,5 +1,8 @@
2013-08-23 Jakub Jelinek <jakub@redhat.com> 2013-08-23 Jakub Jelinek <jakub@redhat.com>
PR target/58218
* gcc.target/i386/pr58218.c: New test.
PR tree-optimization/58209 PR tree-optimization/58209
* gcc.c-torture/execute/pr58209.c: New test. * gcc.c-torture/execute/pr58209.c: New test.

View File

@ -0,0 +1,5 @@
/* PR target/58218 */
/* { dg-do assemble { target lp64 } } */
/* { dg-options "-mcmodel=medium" } */
struct { float x[16385]; } a = { { 0.f, } };