aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-score7.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-score7.c')
-rw-r--r--gas/config/tc-score7.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gas/config/tc-score7.c b/gas/config/tc-score7.c
index 01a1d73..2eae192 100644
--- a/gas/config/tc-score7.c
+++ b/gas/config/tc-score7.c
@@ -4626,8 +4626,8 @@ s7_nopic_need_relax (symbolS * sym, int before_relaxing)
segname = segment_name (S_GET_SEGMENT (sym));
return (strcmp (segname, ".sdata") != 0
&& strcmp (segname, ".sbss") != 0
- && strncmp (segname, ".sdata.", 7) != 0
- && strncmp (segname, ".gnu.linkonce.s.", 16) != 0);
+ && !startswith (segname, ".sdata.")
+ && !startswith (segname, ".gnu.linkonce.s."));
}
/* We are not optimizing for the $gp register. */
else
@@ -5195,8 +5195,7 @@ s7_pic_need_relax (symbolS *sym, asection *segtype)
/* The GNU toolchain uses an extension for ELF: a section
beginning with the magic string .gnu.linkonce is a linkonce
section. */
- if (strncmp (segment_name (symsec), ".gnu.linkonce",
- sizeof ".gnu.linkonce" - 1) == 0)
+ if (startswith (segment_name (symsec), ".gnu.linkonce"))
linkonce = true;
}