Make bfd_byte an int8_t, flagword a uint32_t
[binutils-gdb.git] / bfd / aoutx.h
index 61ea9f7ce047da2bb05dfb5f7bf0d30a064eb4aa..6d6527640fe4b7a3df2e4c834757e311f7d26fcd 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD semi-generic back-end for a.out binaries.
-   Copyright (C) 1990-2022 Free Software Foundation, Inc.
+   Copyright (C) 1990-2023 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -2122,8 +2122,10 @@ NAME (aout, swap_ext_reloc_out) (bfd *abfd,
   if (r_extern)                                                                \
     {                                                                  \
       /* Undefined symbol.  */                                         \
-      if (r_index < bfd_get_symcount (abfd))                           \
+      if (symbols != NULL && r_index < bfd_get_symcount (abfd))                \
        cache_ptr->sym_ptr_ptr = symbols + r_index;                     \
+      else                                                             \
+       cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;   \
       cache_ptr->addend = ad;                                          \
     }                                                                  \
    else                                                                        \
@@ -2907,6 +2909,7 @@ NAME (aout, bfd_free_cached_info) (bfd *abfd)
     return true;
 
 #define BFCI_FREE(x) do { free (x); x = NULL; } while (0)
+  BFCI_FREE (adata (abfd).line_buf);
   BFCI_FREE (obj_aout_symbols (abfd));
 #ifdef USE_MMAP
   obj_aout_external_syms (abfd) = 0;