diff options
author | Martin Liska <mliska@suse.cz> | 2021-03-22 14:56:16 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-04-01 15:00:56 +0200 |
commit | e9b095a538c189369b4792662ea455d2314b0492 (patch) | |
tree | 8a6918add18cd366abcee7964b40605471ce18df /binutils/readelf.c | |
parent | d34049e8bb32ae2dd717dbac88dbcebefe2d6c09 (diff) | |
download | binutils-e9b095a538c189369b4792662ea455d2314b0492.zip binutils-e9b095a538c189369b4792662ea455d2314b0492.tar.gz binutils-e9b095a538c189369b4792662ea455d2314b0492.tar.bz2 |
Remove strneq macro and use startswith.
bfd/ChangeLog:
* ecoff.c (strneq): Remove strneq and use startswith.
(_bfd_ecoff_slurp_armap): Likewise.
binutils/ChangeLog:
* elfcomm.h (strneq): Remove strneq and use startswith.
* readelf.c (ia64_process_unwind): Likewise.
(process_note): Likewise.
gas/ChangeLog:
* config/obj-coff.c (strneq): Remove strneq and use startswith.
(weak_is_altname): Likewise.
(obj_coff_section): Likewise.
* config/tc-cr16.c (process_label_constant): Likewise.
* config/tc-crx.c (strneq): Likewise.
include/ChangeLog:
* opcode/cr16.h (strneq): Remove strneq and use startswith.
ld/ChangeLog:
* ldbuildid.c (strneq): Remove strneq and use startswith.
(validate_build_id_style): Likewise.
(compute_build_id_size): Likewise.
opcodes/ChangeLog:
* arm-dis.c (strneq): Remove strneq and use startswith.
* cr16-dis.c (print_insn_cr16): Likewise.
* score-dis.c (streq): Likewise.
(strneq): Likewise.
* score7-dis.c (strneq): Likewise.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index 01fba0b..5bc59e4 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -8235,8 +8235,8 @@ ia64_process_unwind (Filedata * filedata) } } else if (SECTION_NAME_VALID (unwsec) - && strneq (SECTION_NAME (unwsec), - ELF_STRING_ia64_unwind_once, len)) + && startswith (SECTION_NAME (unwsec), + ELF_STRING_ia64_unwind_once)) { /* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.ia64unwi.FOO. */ len2 = sizeof (ELF_STRING_ia64_unwind_info_once) - 1; @@ -8245,8 +8245,8 @@ ia64_process_unwind (Filedata * filedata) i < filedata->file_header.e_shnum; ++i, ++sec) if (SECTION_NAME_VALID (sec) - && strneq (SECTION_NAME (sec), - ELF_STRING_ia64_unwind_info_once, len2) + && startswith (SECTION_NAME (sec), + ELF_STRING_ia64_unwind_info_once) && streq (SECTION_NAME (sec) + len2, suffix)) break; } @@ -8258,13 +8258,13 @@ ia64_process_unwind (Filedata * filedata) len2 = sizeof (ELF_STRING_ia64_unwind_info) - 1; suffix = ""; if (SECTION_NAME_VALID (unwsec) - && strneq (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind, len)) + && startswith (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind)) suffix = SECTION_NAME (unwsec) + len; for (i = 0, sec = filedata->section_headers; i < filedata->file_header.e_shnum; ++i, ++sec) if (SECTION_NAME_VALID (sec) - && strneq (SECTION_NAME (sec), ELF_STRING_ia64_unwind_info, len2) + && startswith (SECTION_NAME (sec), ELF_STRING_ia64_unwind_info) && streq (SECTION_NAME (sec) + len2, suffix)) break; } @@ -20449,7 +20449,7 @@ process_note (Elf_Internal_Note * pnote, /* NetBSD-specific core file notes. */ return process_netbsd_elf_note (pnote); - else if (strneq (pnote->namedata, "SPU/", 4)) + else if (startswith (pnote->namedata, "SPU/")) { /* SPU-specific core file notes. */ nt = pnote->namedata + 4; |