correct ft32 reloc range test
[deliverable/binutils-gdb.git] / bfd / nlmcode.h
index d4a0d983b9812ad8eeec3615c4526ef337017d77..ac7abaf80f76ec1bbff78bb086016704ad7e2751 100644 (file)
@@ -1,6 +1,5 @@
 /* NLM (NetWare Loadable Module) executable support for BFD.
-   Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1993-2018 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, using ELF support as the
    template.
@@ -9,7 +8,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -19,7 +18,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "sysdep.h"
 #include "bfd.h"
@@ -351,7 +351,9 @@ nlm_swap_auxiliary_headers_in (bfd *abfd)
              bfd_byte *contents;
              bfd_byte *p, *pend;
 
-             BFD_ASSERT (hdrLength == 0 && hdr == NULL);
+             /* See PR 21840 for a reproducer.  */
+             if (hdrLength != 0 || hdr != NULL)
+               return FALSE;
 
              pos = bfd_tell (abfd);
              if (bfd_seek (abfd, dataOffset, SEEK_SET) != 0)
@@ -490,7 +492,7 @@ nlm_object_p (bfd *abfd)
                  NLM_SIGNATURE_SIZE) != 0)
     goto got_wrong_format_error;
 
-  /* There's no supported way to discover the endianess of an NLM, so test for
+  /* There's no supported way to discover the endianness of an NLM, so test for
      a sane version number after doing byte swapping appropriate for this
      XVEC.  (Hack alert!)  */
   if (i_fxdhdrp->version > 0xFFFF)
@@ -1573,7 +1575,7 @@ nlm_external_reloc_compare (const void *p1, const void *p2)
      code sections
      data sections
      other sections (custom data, messages, help, shared NLM, RPC,
-                    module dependencies)
+                    module dependencies)
      relocation fixups
      external references (imports)
      public symbols (exports)
This page took 0.024304 seconds and 4 git commands to generate.