aboutsummaryrefslogtreecommitdiff
path: root/bfd/cofflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-05-07 11:36:07 +0930
committerAlan Modra <amodra@gmail.com>2018-05-07 12:33:26 +0930
commit7bd8862c3ad0ee291d27837ae3cd30288a00b922 (patch)
tree418131f989551335d6f8eead366d563d02dac1a4 /bfd/cofflink.c
parentfe5bc53b24ea5b61b1ff280b737db5ed14c00142 (diff)
downloadgdb-7bd8862c3ad0ee291d27837ae3cd30288a00b922.zip
gdb-7bd8862c3ad0ee291d27837ae3cd30288a00b922.tar.gz
gdb-7bd8862c3ad0ee291d27837ae3cd30288a00b922.tar.bz2
Replace uses of strncmp with memcmp
Avoids gcc pr85623 for these calls. * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than strncmp when checking for ".bf" special symbol. * prXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags section name a char array, remove sentinal known_sections entry, and adjust loop over known_sections to suit. Use memcmp rather than strncmp.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r--bfd/cofflink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index 6ca547c..2f73f72 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -1839,7 +1839,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
case C_FCN:
if (obj_pe (input_bfd)
- && strncmp (isym.n_name, ".bf", sizeof isym.n_name) != 0
+ && memcmp (isym.n_name, ".bf", sizeof ".bf") != 0
&& isym.n_scnum > 0)
{
/* For PE, .lf and .ef get their value left alone,