summaryrefslogtreecommitdiff
path: root/gcc/output.h
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-03 19:12:07 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-03 19:12:07 +0000
commit91da0f1cbba29c0c0d36e70d0d88842d5aaa496d (patch)
treed84c6553f07cd91230768e24b2d35f690b8488db /gcc/output.h
parent61aeb5015aac5a923b4a162b4bbf3cba566b5efe (diff)
downloadgcc-91da0f1cbba29c0c0d36e70d0d88842d5aaa496d.tar.gz
PR middle-end/31490
* output.h (SECTION_RELRO): Define. (SECTION_MACH_DEP): Adjust. (get_variable_section): New prototype. * varpool.c (varpool_finalize_named_section_flags): New function. (varpool_assemble_pending_decls): Call it. * cgraph.h (varpool_finalize_named_section_flags): New prototype. * cgraphunit.c (cgraph_output_in_order): Call varpool_finalize_named_section_flags. * varasm.c (get_section): Allow section flags conflicts between relro and read-only sections if the section hasn't been declared yet. Set SECTION_OVERRIDE after diagnosing section type conflict. (get_variable_section): No longer static. (default_section_type_flags): Use SECTION_WRITE | SECTION_RELRO for readonly sections that need relocations. (decl_readonly_section_1): New function. (decl_readonly_section): Use it. Revert: 2010-11-17 Dinar Temirbulatov <dtemirbulatov@gmail.com> Steve Ellcey <sje@cup.hp.com> PR middle-end/31490 * varasm.c (categorize_decl_for_section): Ignore reloc_rw_mask if section attribute used. * gcc.dg/pr31490-2.c: New test. * gcc.dg/pr31490-3.c: New test. * gcc.dg/pr31490-4.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169804 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/output.h')
-rw-r--r--gcc/output.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/output.h b/gcc/output.h
index 39225a3a6cc..c668d352112 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -1,7 +1,7 @@
/* Declarations for insn-output.c. These functions are defined in recog.c,
final.c, and varasm.c.
Copyright (C) 1987, 1991, 1994, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
@@ -441,7 +441,8 @@ extern void no_asm_to_stream (FILE *);
#define SECTION_DECLARED 0x100000 /* section has been used */
#define SECTION_STYLE_MASK 0x600000 /* bits used for SECTION_STYLE */
#define SECTION_COMMON 0x800000 /* contains common data */
-#define SECTION_MACH_DEP 0x1000000 /* subsequent bits reserved for target */
+#define SECTION_RELRO 0x1000000 /* data is readonly after relocation processing */
+#define SECTION_MACH_DEP 0x2000000 /* subsequent bits reserved for target */
/* This SECTION_STYLE is used for unnamed sections that we can switch
to using a special assembler directive. */
@@ -585,6 +586,7 @@ extern section *get_unnamed_section (unsigned int, void (*) (const void *),
const void *);
extern section *get_section (const char *, unsigned int, tree);
extern section *get_named_section (tree, const char *, int);
+extern section *get_variable_section (tree, bool);
extern void place_block_symbol (rtx);
extern rtx get_section_anchor (struct object_block *, HOST_WIDE_INT,
enum tls_model);