]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
elfcore_grok_freebsd_note: Remove checks of note->namesz.
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 1 Apr 2022 20:16:46 +0000 (13:16 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Fri, 1 Apr 2022 20:16:46 +0000 (13:16 -0700)
This function is only called if the note name is "FreeBSD", so
checking the name size is unnecessary.

bfd/ChangeLog:

* elf.c (elfcore_grok_freebsd_note): Remove checks for namesz.

bfd/ChangeLog
bfd/elf.c

index 86d42b2d6391de4d3233a422d9a9770f2e78e073..1fcb8d97a7422c5c922e65e118e01fafa83760f0 100644 (file)
@@ -1,3 +1,7 @@
+2022-04-01  John Baldwin  <jhb@FreeBSD.org>
+
+       * elf.c (elfcore_grok_freebsd_note): Remove checks for namesz.
+
 2022-03-22  Steiner H Gunderson  <steinar+sourceware@gunderson.no>
 
        * dwarf2.c (_bfd_dwarf2_find_nearest_line): if a function name is
index 82b53be99f99f71974bab96b9c219cb1bf5e2d43..a99149e50b37c6cbca95355bca911490bb91b72a 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -11010,10 +11010,7 @@ elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note)
       return elfcore_grok_freebsd_psinfo (abfd, note);
 
     case NT_FREEBSD_THRMISC:
-      if (note->namesz == 8)
-       return elfcore_make_note_pseudosection (abfd, ".thrmisc", note);
-      else
-       return true;
+      return elfcore_make_note_pseudosection (abfd, ".thrmisc", note);
 
     case NT_FREEBSD_PROCSTAT_PROC:
       return elfcore_make_note_pseudosection (abfd, ".note.freebsdcore.proc",
@@ -11031,10 +11028,7 @@ elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note)
       return elfcore_make_auxv_note_section (abfd, note, 4);
 
     case NT_X86_XSTATE:
-      if (note->namesz == 8)
-       return elfcore_grok_xstatereg (abfd, note);
-      else
-       return true;
+      return elfcore_grok_xstatereg (abfd, note);
 
     case NT_FREEBSD_PTLWPINFO:
       return elfcore_make_note_pseudosection (abfd, ".note.freebsdcore.lwpinfo",