aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKai Tietz <ktietz@redhat.com>2012-07-04 13:22:02 +0200
committerKai Tietz <ktietz@gcc.gnu.org>2012-07-04 13:22:02 +0200
commit463d5aa029d128de82fac1bfd85bd10376673808 (patch)
tree5b0b8f02a1f37fc6c8c17f65fb89cfacc30b2998 /gcc
parentcef8c10098ffd48dec16db4a8a67e1cd542a1163 (diff)
downloadgcc-463d5aa029d128de82fac1bfd85bd10376673808.zip
gcc-463d5aa029d128de82fac1bfd85bd10376673808.tar.gz
gcc-463d5aa029d128de82fac1bfd85bd10376673808.tar.bz2
winnt.c (i386_pe_reloc_rw_mask): New function.
* config/i386/winnt.c (i386_pe_reloc_rw_mask): New function. * config/i386/i386-protos.h (i386_pe_reloc_rw_mask): Add prototype. * config/i386/cygming.h (TARGET_ASM_RELOC_RW_MASK): Define as i386_pe_reloc_rw_mask. From-SVN: r189254
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/cygming.h5
-rw-r--r--gcc/config/i386/i386-protos.h2
-rw-r--r--gcc/config/i386/winnt.c8
4 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ef3b9c4..b5110a6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2012-07-04 Kai Tietz <ktietz@redhat.com>
+
+ * config/i386/winnt.c (i386_pe_reloc_rw_mask): New function.
+ * config/i386/i386-protos.h (i386_pe_reloc_rw_mask): Add
+ prototype.
+ * config/i386/cygming.h (TARGET_ASM_RELOC_RW_MASK): Define
+ as i386_pe_reloc_rw_mask.
+
2012-07-04 Richard Guenther <rguenther@suse.de>
* tree.c (find_decls_types_r): Handle TYPE_CONTEXT the same
diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h
index 2eccda9..b5f89c4 100644
--- a/gcc/config/i386/cygming.h
+++ b/gcc/config/i386/cygming.h
@@ -225,6 +225,11 @@ do { \
#define SUBTARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info
+/* Local and global relocs can be placed always into readonly memory
+ for PE-COFF targets. */
+#undef TARGET_ASM_RELOC_RW_MASK
+#define TARGET_ASM_RELOC_RW_MASK i386_pe_reloc_rw_mask
+
/* Output a common block. */
#undef ASM_OUTPUT_ALIGNED_DECL_COMMON
#define ASM_OUTPUT_ALIGNED_DECL_COMMON \
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 581b25c..1d3aecc 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -264,6 +264,8 @@ extern void i386_pe_adjust_class_at_definition (tree);
extern bool i386_pe_type_dllimport_p (tree);
extern bool i386_pe_type_dllexport_p (tree);
+extern int i386_pe_reloc_rw_mask (void);
+
extern rtx maybe_get_pool_constant (rtx);
extern char internal_label_prefix[16];
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index 10cdee8..5b71ccb 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -421,6 +421,14 @@ i386_pe_unique_section (tree decl, int reloc)
DECL_SECTION_NAME (decl) = build_string (len, string);
}
+/* Local and global relocs can be placed always into readonly memory for
+ memory for PE-COFF targets. */
+int
+i386_pe_reloc_rw_mask (void)
+{
+ return 0;
+}
+
/* 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.