diff options
author | Martin Liska <mliska@suse.cz> | 2021-03-22 12:12:36 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-04-01 14:58:36 +0200 |
commit | 24d127aa9f26445709dbd53e14e2ab636a449888 (patch) | |
tree | ab6a6cf08408f26812202c4d66128dadf35cc2a6 /binutils/elfcomm.c | |
parent | 84838a61666fbc412119f544e6973ab59dd510a4 (diff) | |
download | gdb-24d127aa9f26445709dbd53e14e2ab636a449888.zip gdb-24d127aa9f26445709dbd53e14e2ab636a449888.tar.gz gdb-24d127aa9f26445709dbd53e14e2ab636a449888.tar.bz2 |
Replace const_strneq with startswith.
binutils/ChangeLog:
* dwarf.c (display_debug_lines_raw): Replace const_strneq with
startswith.
(display_debug_lines_decoded): Likewise.
(display_debug_links): Likewise.
* elfcomm.c (setup_archive): Likewise.
* elfcomm.h (const_strneq): Likewise.
* readelf.c (process_section_headers): Likewise.
(slurp_ia64_unwind_table): Likewise.
(slurp_hppa_unwind_table): Likewise.
(decode_arm_unwind): Likewise.
(display_debug_section): Likewise.
(process_note): Likewise.
Diffstat (limited to 'binutils/elfcomm.c')
-rw-r--r-- | binutils/elfcomm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/binutils/elfcomm.c b/binutils/elfcomm.c index 5cf4c24..c5092c6 100644 --- a/binutils/elfcomm.c +++ b/binutils/elfcomm.c @@ -27,6 +27,7 @@ #include "sysdep.h" #include "libiberty.h" +#include "bfd.h" #include "filenames.h" #include "aout/ar.h" #include "elfcomm.h" @@ -611,12 +612,12 @@ setup_archive (struct archive_info *arch, const char *file_name, } /* See if this is the archive symbol table. */ - if (const_strneq (arch->arhdr.ar_name, "/ ")) + if (startswith (arch->arhdr.ar_name, "/ ")) { if (! process_archive_index_and_symbols (arch, 4, read_symbols)) return 1; } - else if (const_strneq (arch->arhdr.ar_name, "/SYM64/ ")) + else if (startswith (arch->arhdr.ar_name, "/SYM64/ ")) { arch->uses_64bit_indices = 1; if (! process_archive_index_and_symbols (arch, 8, read_symbols)) @@ -625,7 +626,7 @@ setup_archive (struct archive_info *arch, const char *file_name, else if (read_symbols) printf (_("%s has no archive index\n"), file_name); - if (const_strneq (arch->arhdr.ar_name, "// ")) + if (startswith (arch->arhdr.ar_name, "// ")) { /* This is the archive string table holding long member names. */ char fmag_save = arch->arhdr.ar_fmag[0]; |