/* 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.
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)
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)
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)