diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/elfcomm.h | 1 | ||||
-rw-r--r-- | binutils/readelf.c | 14 |
2 files changed, 7 insertions, 8 deletions
diff --git a/binutils/elfcomm.h b/binutils/elfcomm.h index 04e909c..921d42c 100644 --- a/binutils/elfcomm.h +++ b/binutils/elfcomm.h @@ -47,7 +47,6 @@ extern void byte_get_64 (const unsigned char *, elf_vma *, elf_vma *); /* This is just a bit of syntatic sugar. */ #define streq(a,b) (strcmp ((a), (b)) == 0) -#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0) /* Structure to hold information about an archive file. */ 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; |