aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2019-07-12 09:40:39 -0600
committerJeff Law <law@gcc.gnu.org>2019-07-12 09:40:39 -0600
commitc3a7a7b8abb7e356c34c9bccde895d76c514e2dd (patch)
tree1a1d1bec622e887567a8300af9cae3c0d0fe4743 /gcc
parentcf91b5997dec281e4b784c163d76d5be3e8569f6 (diff)
downloadgcc-c3a7a7b8abb7e356c34c9bccde895d76c514e2dd.zip
gcc-c3a7a7b8abb7e356c34c9bccde895d76c514e2dd.tar.gz
gcc-c3a7a7b8abb7e356c34c9bccde895d76c514e2dd.tar.bz2
c6x.c (c6x_section_type): Clear SECTION_NOTYPE for the ".far" section.
* config/c6x/c6x.c (c6x_section_type): Clear SECTION_NOTYPE for the ".far" section. From-SVN: r273447
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/c6x/c6x.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 84fee9e..4f32256 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-12 Jeff Law <law@redhat.com>
+
+ * config/c6x/c6x.c (c6x_section_type): Clear SECTION_NOTYPE
+ for the ".far" section.
+
2019-07-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/91145
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c
index 93841e4..f6c9bbf 100644
--- a/gcc/config/c6x/c6x.c
+++ b/gcc/config/c6x/c6x.c
@@ -1083,6 +1083,14 @@ c6x_section_type_flags (tree decl, const char *name, int reloc)
flags |= default_section_type_flags (decl, name, reloc);
+ /* The ".far" section will be declared with @nobits elsewhere.
+ But when declared via this path it will not have the @nobits
+ flag because of SECTION_NOTYPE. This causes linker warnings
+ due to the mismatched attribute. Clearing SECTION_NOTYPE
+ for the ".far" section is sufficient to fix this problem. */
+ if (strcmp (name, ".far") == 0)
+ flags &= ~SECTION_NOTYPE;
+
return flags;
}