Don't use bfd_get_* macro to set bfd fields
authorAlan Modra <amodra@gmail.com>
Wed, 18 Sep 2019 05:37:33 +0000 (15:07 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 18 Sep 2019 12:51:58 +0000 (22:21 +0930)
* aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
macros.
* pdp11.c (slurp_symbol_table): Likewise.
* som.c (som_slurp_symbol_table): Likewise.
* coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
* coffcode.h (coff_slurp_symbol_table): Likewise.
* cofflink.c (_bfd_coff_final_link): Likewise.
* ecoff.c (ecoff_slurp_symbolic_header): Likewise.
(_bfd_ecoff_slurp_symbolic_info): Likewise.
(_bfd_ecoff_slurp_symbol_table): Likewise.
(_bfd_ecoff_bfd_final_link): Likewise.
* elf.c (_bfd_elf_canonicalize_symtab): Likewise.
* elflink.c (elf_link_output_symstrtab): Likewise.
(bfd_elf_final_link): Likewise.
* peicode.h (pe_ILF_build_a_bfd): Likewise.
* xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
* aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
start_address or symcount using bfd_get macros.
* coffgen.c (coff_real_object_p): Likewise.
* pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
* som.c (som_object_setup, som_slurp_symbol_table): Likewise.
* elfcore.h (elf_core_file_p): Don't set start_address using
bfd_get macro.
* elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
using bfd_get macro.
* bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
* linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
or symcount using bfd_get macros.
(_bfd_generic_final_link, generic_add_output_symbol): Likewise.
* syms.c (bfd_set_symtab): Likewise.
* vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
* archive.c (do_slurp_bsd_armap): Don't set has_armap using
bfd_has_map macro.
(do_slurp_coff_armap, bfd_slurp_armap): Likewise.
* archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
* coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
* coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
* ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
* som.c (som_slurp_armap): Likewise.

22 files changed:
bfd/ChangeLog
bfd/aoutx.h
bfd/archive.c
bfd/archive64.c
bfd/bfd.c
bfd/coff-ppc.c
bfd/coff-rs6000.c
bfd/coff64-rs6000.c
bfd/coffcode.h
bfd/coffgen.c
bfd/cofflink.c
bfd/ecoff.c
bfd/elf.c
bfd/elfcore.h
bfd/elflink.c
bfd/linker.c
bfd/pdp11.c
bfd/peicode.h
bfd/som.c
bfd/syms.c
bfd/vms-alpha.c
bfd/xcofflink.c

index 820c3bd5d78efad800510c9442784892fa600b12..32c57b796343f09eeb245796884bbf4bd8466a9d 100644 (file)
@@ -1,3 +1,45 @@
+2019-09-18  Alan Modra  <amodra@gmail.com>
+
+       * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
+       macros.
+       * pdp11.c (slurp_symbol_table): Likewise.
+       * som.c (som_slurp_symbol_table): Likewise.
+       * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
+       * coffcode.h (coff_slurp_symbol_table): Likewise.
+       * cofflink.c (_bfd_coff_final_link): Likewise.
+       * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
+       (_bfd_ecoff_slurp_symbolic_info): Likewise.
+       (_bfd_ecoff_slurp_symbol_table): Likewise.
+       (_bfd_ecoff_bfd_final_link): Likewise.
+       * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
+       * elflink.c (elf_link_output_symstrtab): Likewise.
+       (bfd_elf_final_link): Likewise.
+       * peicode.h (pe_ILF_build_a_bfd): Likewise.
+       * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
+       * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
+       start_address or symcount using bfd_get macros.
+       * coffgen.c (coff_real_object_p): Likewise.
+       * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
+       * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
+       * elfcore.h (elf_core_file_p): Don't set start_address using
+       bfd_get macro.
+       * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
+       using bfd_get macro.
+       * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
+       * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
+       or symcount using bfd_get macros.
+       (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
+       * syms.c (bfd_set_symtab): Likewise.
+       * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
+       * archive.c (do_slurp_bsd_armap): Don't set has_armap using
+       bfd_has_map macro.
+       (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
+       * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
+       * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
+       * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
+       * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
+       * som.c (som_slurp_armap): Likewise.
+
 2019-09-18  Alan Modra  <amodra@gmail.com>
 
        * archures.c (bfd_get_arch): Make param const.
index e5d8dcf3907de6dede3d99d469da4cafb4cd8332..cd50b44e60af2fce7c4edb580a25216625e59697 100644 (file)
@@ -511,10 +511,10 @@ NAME (aout, some_aout_object_p) (bfd *abfd,
        was called.  */
     abort ();
 
-  bfd_get_start_address (abfd) = execp->a_entry;
+  abfd->start_address = execp->a_entry;
 
   obj_aout_symbols (abfd) = NULL;
-  bfd_get_symcount (abfd) = execp->a_syms / sizeof (struct external_nlist);
+  abfd->symcount = execp->a_syms / sizeof (struct external_nlist);
 
   /* The default relocation entry size is that of traditional V7 Unix.  */
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
@@ -1782,7 +1782,7 @@ NAME (aout, slurp_symbol_table) (bfd *abfd)
       return FALSE;
     }
 
-  bfd_get_symcount (abfd) = obj_aout_external_sym_count (abfd);
+  abfd->symcount = obj_aout_external_sym_count (abfd);
 
   obj_aout_symbols (abfd) = cached;
 
index ef71e8a79632c0d4306c091ab3d40a2460fc1e58..dc0400d1cf6bbbe00ca86eb41e066755a04ac901 100644 (file)
@@ -1013,7 +1013,7 @@ do_slurp_bsd_armap (bfd *abfd)
   /* FIXME, we should provide some way to free raw_ardata when
      we are done using the strings from it.  For now, it seems
      to be allocated on an objalloc anyway...  */
-  bfd_has_map (abfd) = TRUE;
+  abfd->has_armap = TRUE;
   return TRUE;
 }
 
@@ -1105,7 +1105,7 @@ do_slurp_coff_armap (bfd *abfd)
   /* Pad to an even boundary if you have to.  */
   ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
 
-  bfd_has_map (abfd) = TRUE;
+  abfd->has_armap = TRUE;
   bfd_release (abfd, raw_armap);
 
   /* Check for a second archive header (as used by PE).  */
@@ -1188,7 +1188,7 @@ bfd_slurp_armap (bfd *abfd)
        return do_slurp_bsd_armap (abfd);
     }
 
-  bfd_has_map (abfd) = FALSE;
+  abfd->has_armap = FALSE;
   return TRUE;
 }
 \f
index a2c628e2b55ede4bca6766ec83f68bf9d1e44270..37fecc28d4831269628786b015353c0a33654fdb 100644 (file)
@@ -66,7 +66,7 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
 
   if (! CONST_STRNEQ (nextname, "/SYM64/         "))
     {
-      bfd_has_map (abfd) = FALSE;
+      abfd->has_armap = FALSE;
       return TRUE;
     }
 
@@ -137,7 +137,7 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
   /* Pad to an even boundary if you have to.  */
   ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
 
-  bfd_has_map (abfd) = TRUE;
+  abfd->has_armap = TRUE;
   bfd_release (abfd, raw_armap);
 
   return TRUE;
index 91403508a9a100f94b7689da95d23c5f1241fe35..c973c780b40f7ec4e42f6b5f974bd0504aca7ca8 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1418,7 +1418,7 @@ bfd_set_file_flags (bfd *abfd, flagword flags)
       return FALSE;
     }
 
-  bfd_get_file_flags (abfd) = flags;
+  abfd->flags = flags;
   if ((flags & bfd_applicable_file_flags (abfd)) != flags)
     {
       bfd_set_error (bfd_error_invalid_operation);
index 40824c5cb064fd5d1dc7a160678770dd18fc4bf6..ab5c2c837c10e10b317261a6488b916535ff7edb 100644 (file)
@@ -2420,9 +2420,9 @@ ppc_bfd_coff_final_link (bfd *abfd, struct bfd_link_info *info)
 
   _bfd_stringtab_free (flaginfo.strtab);
 
-  /* Setting bfd_get_symcount to 0 will cause write_object_contents to
+  /* Setting symcount to 0 will cause write_object_contents to
      not try to write out the symbols.  */
-  bfd_get_symcount (abfd) = 0;
+  abfd->symcount = 0;
 
   return TRUE;
 
index 4620254aaef9facbf7a998b04e5e1963276f45f0..bdbb499a4ab245170b47668fedb386485849bfb5 100644 (file)
@@ -1243,7 +1243,7 @@ _bfd_xcoff_slurp_armap (bfd *abfd)
 
   if (xcoff_ardata (abfd) == NULL)
     {
-      bfd_has_map (abfd) = FALSE;
+      abfd->has_armap = FALSE;
       return TRUE;
     }
 
@@ -1255,7 +1255,7 @@ _bfd_xcoff_slurp_armap (bfd *abfd)
       GET_VALUE_IN_FIELD (off, xcoff_ardata (abfd)->symoff, 10);
       if (off == 0)
        {
-         bfd_has_map (abfd) = FALSE;
+         abfd->has_armap = FALSE;
          return TRUE;
        }
 
@@ -1310,7 +1310,7 @@ _bfd_xcoff_slurp_armap (bfd *abfd)
       GET_VALUE_IN_FIELD (off, xcoff_ardata_big (abfd)->symoff, 10);
       if (off == 0)
        {
-         bfd_has_map (abfd) = FALSE;
+         abfd->has_armap = FALSE;
          return TRUE;
        }
 
@@ -1373,7 +1373,7 @@ _bfd_xcoff_slurp_armap (bfd *abfd)
     }
 
   bfd_ardata (abfd)->symdef_count = c;
-  bfd_has_map (abfd) = TRUE;
+  abfd->has_armap = TRUE;
 
   return TRUE;
 }
index b6b189fd2d730543c1851cfbdd8abd25ba27d365..1c80a9df8851c39c3a1459320d299f11c9e4fca2 100644 (file)
@@ -1906,7 +1906,7 @@ xcoff64_slurp_armap (bfd *abfd)
 
   if (xcoff_ardata (abfd) == NULL)
     {
-      bfd_has_map (abfd) = FALSE;
+      abfd->has_armap = FALSE;
       return TRUE;
     }
 
@@ -1914,7 +1914,7 @@ xcoff64_slurp_armap (bfd *abfd)
                      (const char **) NULL, 10);
   if (off == 0)
     {
-      bfd_has_map (abfd) = FALSE;
+      abfd->has_armap = FALSE;
       return TRUE;
     }
 
@@ -1976,7 +1976,7 @@ xcoff64_slurp_armap (bfd *abfd)
     }
 
   bfd_ardata (abfd)->symdef_count = c;
-  bfd_has_map (abfd) = TRUE;
+  abfd->has_armap = TRUE;
 
   return TRUE;
 }
index 054e45c960b2de3c5edc6d222183b459294c1ea4..dd3189fbd3d4b1f002c092fa5891d22c392e8525 100644 (file)
@@ -4809,7 +4809,7 @@ coff_slurp_symbol_table (bfd * abfd)
   obj_symbols (abfd) = cached_area;
   obj_raw_syments (abfd) = native_symbols;
 
-  bfd_get_symcount (abfd) = number_of_symbols;
+  abfd->symcount = number_of_symbols;
   obj_convert (abfd) = table_ptr;
   /* Slurp the line tables for each section too.  */
   {
index 209b01d5d01a1fcb948c766e39fd4e075ab00e8d..80a9a2ab9ae6ce2d8905c0b51922f4104205507c 100644 (file)
@@ -257,14 +257,14 @@ coff_real_object_p (bfd *abfd,
   if ((internal_f->f_flags & F_EXEC) != 0)
     abfd->flags |= D_PAGED;
 
-  bfd_get_symcount (abfd) = internal_f->f_nsyms;
+  abfd->symcount = internal_f->f_nsyms;
   if (internal_f->f_nsyms)
     abfd->flags |= HAS_SYMS;
 
   if (internal_a != (struct internal_aouthdr *) NULL)
-    bfd_get_start_address (abfd) = internal_a->entry;
+    abfd->start_address = internal_a->entry;
   else
-    bfd_get_start_address (abfd) = 0;
+    abfd->start_address = 0;
 
   /* Set up the tdata area.  ECOFF uses its own routine, and overrides
      abfd->flags.  */
@@ -309,7 +309,7 @@ coff_real_object_p (bfd *abfd,
  fail2:
   abfd->tdata.any = tdata_save;
   abfd->flags = oflags;
-  bfd_get_start_address (abfd) = ostart;
+  abfd->start_address = ostart;
   return (const bfd_target *) NULL;
 }
 
index 5e02760154306e6a51093ef8a31f21217861a60d..34d68c93b5da2525cd509c6d07f8d9e814b46d4b 100644 (file)
@@ -1186,9 +1186,9 @@ _bfd_coff_final_link (bfd *abfd,
 
   _bfd_stringtab_free (flaginfo.strtab);
 
-  /* Setting bfd_get_symcount to 0 will cause write_object_contents to
+  /* Setting symcount to 0 will cause write_object_contents to
      not try to write out the symbols.  */
-  bfd_get_symcount (abfd) = 0;
+  abfd->symcount = 0;
 
   return TRUE;
 
index f9844b3b4b0904c1159848822bd050835ed14989..1e6f4d219cde7bc8056fc49109856c9114198fcd 100644 (file)
@@ -446,7 +446,7 @@ ecoff_slurp_symbolic_header (bfd *abfd)
   /* See whether there is a symbolic header.  */
   if (ecoff_data (abfd)->sym_filepos == 0)
     {
-      bfd_get_symcount (abfd) = 0;
+      abfd->symcount = 0;
       return TRUE;
     }
 
@@ -479,8 +479,7 @@ ecoff_slurp_symbolic_header (bfd *abfd)
     }
 
   /* Now we can get the correct number of symbols.  */
-  bfd_get_symcount (abfd) = (internal_symhdr->isymMax
-                            + internal_symhdr->iextMax);
+  abfd->symcount = internal_symhdr->isymMax + internal_symhdr->iextMax;
 
   if (raw != NULL)
     free (raw);
@@ -521,7 +520,7 @@ _bfd_ecoff_slurp_symbolic_info (bfd *abfd,
     return TRUE;
   if (ecoff_data (abfd)->sym_filepos == 0)
     {
-      bfd_get_symcount (abfd) = 0;
+      abfd->symcount = 0;
       return TRUE;
     }
 
@@ -965,7 +964,7 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd)
      the symbol count and warning the user.  */
   if (internal_ptr - internal < (ptrdiff_t) bfd_get_symcount (abfd))
     {
-      bfd_get_symcount (abfd) = internal_ptr - internal;
+      abfd->symcount = internal_ptr - internal;
       _bfd_error_handler
        /* xgettext:c-format */
        (_("%pB: warning: isymMax (%ld) is greater than ifdMax (%ld)"),
@@ -2905,7 +2904,7 @@ _bfd_ecoff_slurp_armap (bfd *abfd)
          && nextname[ARMAP_OBJECT_ENDIAN_INDEX] != ARMAP_LITTLE_ENDIAN)
       || ! strneq (nextname + ARMAP_END_INDEX, ARMAP_END, sizeof ARMAP_END - 1))
     {
-      bfd_has_map (abfd) = FALSE;
+      abfd->has_armap = FALSE;
       return TRUE;
     }
 
@@ -3018,7 +3017,7 @@ _bfd_ecoff_slurp_armap (bfd *abfd)
   /* Pad to an even boundary.  */
   ardata->first_file_filepos += ardata->first_file_filepos % 2;
 
-  bfd_has_map (abfd) = TRUE;
+  abfd->has_armap = TRUE;
 
   return TRUE;
 }
@@ -4459,7 +4458,7 @@ _bfd_ecoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
        }
     }
 
-  bfd_get_symcount (abfd) = symhdr->iextMax + symhdr->isymMax;
+  abfd->symcount = symhdr->iextMax + symhdr->isymMax;
 
   ecoff_data (abfd)->linker = TRUE;
 
index ec4c643d59ad396097a8d0ffcc220c54293c6348..ecd348e1a5093bf32ce6daa51c054705350dacc2 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -8405,7 +8405,7 @@ _bfd_elf_canonicalize_symtab (bfd *abfd, asymbol **allocation)
   long symcount = bed->s->slurp_symbol_table (abfd, allocation, FALSE);
 
   if (symcount >= 0)
-    bfd_get_symcount (abfd) = symcount;
+    abfd->symcount = symcount;
   return symcount;
 }
 
@@ -8417,7 +8417,7 @@ _bfd_elf_canonicalize_dynamic_symtab (bfd *abfd,
   long symcount = bed->s->slurp_symbol_table (abfd, allocation, TRUE);
 
   if (symcount >= 0)
-    bfd_get_dynamic_symcount (abfd) = symcount;
+    abfd->dynsymcount = symcount;
   return symcount;
 }
 
index 395feb5ef380b84c1df65e822f2c8373606dd25a..3550eaac27248184cef6b7ba7c86b6e39d287945 100644 (file)
@@ -305,7 +305,7 @@ elf_core_file_p (bfd *abfd)
   }
 
   /* Save the entry point from the ELF header.  */
-  bfd_get_start_address (abfd) = i_ehdrp->e_entry;
+  abfd->start_address = i_ehdrp->e_entry;
   return abfd->xvec;
 
 wrong:
index 16d83bb7a3035357bb47260800c83085bc039fa6..8f18be07db72bb93625ddf63efff2cc64fbedb22 100644 (file)
@@ -9481,7 +9481,7 @@ elf_link_output_symstrtab (struct elf_final_link_info *flinfo,
   hash_table->strtab[hash_table->strtabcount].destshndx_index
     = flinfo->symshndxbuf ? bfd_get_symcount (flinfo->output_bfd) : 0;
 
-  bfd_get_symcount (flinfo->output_bfd) += 1;
+  flinfo->output_bfd->symcount += 1;
   hash_table->strtabcount += 1;
 
   return 1;
@@ -12012,7 +12012,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
   /* Figure out the file positions for everything but the symbol table
      and the relocs.  We set symcount to force assign_section_numbers
      to create a symbol table.  */
-  bfd_get_symcount (abfd) = info->strip != strip_all || emit_relocs;
+  abfd->symcount = info->strip != strip_all || emit_relocs;
   BFD_ASSERT (! abfd->output_has_begun);
   if (! _bfd_elf_compute_section_file_positions (abfd, info))
     goto error_return;
@@ -12057,7 +12057,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
      .symtab, .strtab, and non-loaded reloc sections.  We start the
      .symtab section at the current file position, and write directly
      to it.  We build the .strtab section in memory.  */
-  bfd_get_symcount (abfd) = 0;
+  abfd->symcount = 0;
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   /* sh_name is set in prep_headers.  */
   symtab_hdr->sh_type = SHT_SYMTAB;
index f6eef93259bcb24a9a9a3159e49d138f1f6aa9e9..8aec0d23588d2934111bfc733fcc6177e77e4ac3 100644 (file)
@@ -810,14 +810,13 @@ bfd_generic_link_read_symbols (bfd *abfd)
       symsize = bfd_get_symtab_upper_bound (abfd);
       if (symsize < 0)
        return FALSE;
-      bfd_get_outsymbols (abfd) = (struct bfd_symbol **) bfd_alloc (abfd,
-                                                                   symsize);
+      abfd->outsymbols = bfd_alloc (abfd, symsize);
       if (bfd_get_outsymbols (abfd) == NULL && symsize != 0)
        return FALSE;
       symcount = bfd_canonicalize_symtab (abfd, bfd_get_outsymbols (abfd));
       if (symcount < 0)
        return FALSE;
-      bfd_get_symcount (abfd) = symcount;
+      abfd->symcount = symcount;
     }
 
   return TRUE;
@@ -1824,8 +1823,8 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info)
   size_t outsymalloc;
   struct generic_write_global_symbol_info wginfo;
 
-  bfd_get_outsymbols (abfd) = NULL;
-  bfd_get_symcount (abfd) = 0;
+  abfd->outsymbols = NULL;
+  abfd->symcount = 0;
   outsymalloc = 0;
 
   /* Mark all sections which will be included in the output file.  */
@@ -1958,12 +1957,12 @@ generic_add_output_symbol (bfd *output_bfd, size_t *psymalloc, asymbol *sym)
       newsyms = (asymbol **) bfd_realloc (bfd_get_outsymbols (output_bfd), amt);
       if (newsyms == NULL)
        return FALSE;
-      bfd_get_outsymbols (output_bfd) = newsyms;
+      output_bfd->outsymbols = newsyms;
     }
 
-  bfd_get_outsymbols (output_bfd) [bfd_get_symcount (output_bfd)] = sym;
+  output_bfd->outsymbols[output_bfd->symcount] = sym;
   if (sym != NULL)
-    ++ bfd_get_symcount (output_bfd);
+    ++output_bfd->symcount;
 
   return TRUE;
 }
index 1d34047fdc06ebe3a4bdbc5eabe5be7ed40ea0f8..f7f31284095a8cc7b2595d5e2dc7235c0d8bb3df 100644 (file)
@@ -505,10 +505,10 @@ NAME (aout, some_aout_object_p) (bfd *abfd,
       abort ();
     }
 
-  bfd_get_start_address (abfd) = execp->a_entry;
+  abfd->start_address = execp->a_entry;
 
   obj_aout_symbols (abfd) = NULL;
-  bfd_get_symcount (abfd) = execp->a_syms / sizeof (struct external_nlist);
+  abfd->symcount = execp->a_syms / sizeof (struct external_nlist);
 
   /* The default relocation entry size is that of traditional V7 Unix.  */
   obj_reloc_entry_size (abfd) = RELOC_SIZE;
@@ -1512,7 +1512,7 @@ NAME (aout, slurp_symbol_table) (bfd *abfd)
       return FALSE;
     }
 
-  bfd_get_symcount (abfd) = obj_aout_external_sym_count (abfd);
+  abfd->symcount = obj_aout_external_sym_count (abfd);
 
   obj_aout_symbols (abfd) = cached;
 
index 2a564fec984e13797c560c144d1d3432a98fb19d..679474ecd152892e0e1a881260ee4b672238d967 100644 (file)
@@ -1093,7 +1093,7 @@ pe_ILF_build_a_bfd (bfd *     abfd,
 
   /* Point the bfd at the symbol table.  */
   obj_symbols (abfd) = vars.sym_cache;
-  bfd_get_symcount (abfd) = vars.sym_index;
+  abfd->symcount = vars.sym_index;
 
   obj_raw_syments (abfd) = vars.native_syms;
   obj_raw_syment_count (abfd) = vars.sym_index;
index cf788434523ca374f3b58851300be2a6f8c82018..4c9dcaee67673b2e951a208e7fb41b94db8295da 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -2031,12 +2031,12 @@ som_object_setup (bfd *abfd,
          || (aux_hdrp->exec_entry & 0x3) != 0
          || ! found)
        {
-         bfd_get_start_address (abfd) = aux_hdrp->exec_flags;
+         abfd->start_address = aux_hdrp->exec_flags;
          obj_som_exec_data (abfd)->exec_flags = aux_hdrp->exec_entry;
        }
       else
        {
-         bfd_get_start_address (abfd) = aux_hdrp->exec_entry + current_offset;
+         abfd->start_address = aux_hdrp->exec_entry + current_offset;
          obj_som_exec_data (abfd)->exec_flags = aux_hdrp->exec_flags;
        }
     }
@@ -2044,7 +2044,7 @@ som_object_setup (bfd *abfd,
   obj_som_exec_data (abfd)->version_id = file_hdrp->version_id;
 
   bfd_default_set_arch_mach (abfd, bfd_arch_hppa, pa10);
-  bfd_get_symcount (abfd) = file_hdrp->symbol_total;
+  abfd->symcount = file_hdrp->symbol_total;
 
   /* Initialize the saved symbol table and string table to NULL.
      Save important offsets and sizes from the SOM header into
@@ -4792,7 +4792,7 @@ som_slurp_symbol_table (bfd *abfd)
 
   /* We modify the symbol count to record the number of BFD symbols we
      created.  */
-  bfd_get_symcount (abfd) = sym - symbase;
+  abfd->symcount = sym - symbase;
 
   /* Save our results and return success.  */
   obj_som_symtab (abfd) = symbase;
@@ -6131,7 +6131,7 @@ som_slurp_armap (bfd *abfd)
   /* For archives without .o files there is no symbol table.  */
   if (! CONST_STRNEQ (nextname, "/               "))
     {
-      bfd_has_map (abfd) = FALSE;
+      abfd->has_armap = FALSE;
       return TRUE;
     }
 
@@ -6201,7 +6201,7 @@ som_slurp_armap (bfd *abfd)
     return FALSE;
 
   /* Notify the generic archive code that we have a symbol map.  */
-  bfd_has_map (abfd) = TRUE;
+  abfd->has_armap = TRUE;
   return TRUE;
 }
 
index da1c90d52ebeb7badb5722d58ed2f1ddfd081b1d..4d532b2cd21cfc99731cf8e6860cb2d0861e6028 100644 (file)
@@ -455,8 +455,8 @@ bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int symcount)
       return FALSE;
     }
 
-  bfd_get_outsymbols (abfd) = location;
-  bfd_get_symcount (abfd) = symcount;
+  abfd->outsymbols = location;
+  abfd->symcount = symcount;
   return TRUE;
 }
 
index 69822a2ce6a4c379e3c2b5c555846de0aa84a695..8d2a2dff623a15ea9756e8e9e39a03a77d76d405 100644 (file)
@@ -8912,8 +8912,8 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
       return FALSE;
     }
 
-  bfd_get_outsymbols (abfd) = NULL;
-  bfd_get_symcount (abfd) = 0;
+  abfd->outsymbols = NULL;
+  abfd->symcount = 0;
 
   /* Mark all sections which will be included in the output file.  */
   for (o = abfd->sections; o != NULL; o = o->next)
index f9c12e40f343963805e8a76825fc971ce15a9eeb..1a2f87c4b0084cc3ade3539d8add2b6f23638e1d 100644 (file)
@@ -6412,9 +6412,9 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
        goto error_return;
     }
 
-  /* Setting bfd_get_symcount to 0 will cause write_object_contents to
+  /* Setting symcount to 0 will cause write_object_contents to
      not try to write out the symbols.  */
-  bfd_get_symcount (abfd) = 0;
+  abfd->symcount = 0;
 
   return TRUE;
 
This page took 0.051939 seconds and 4 git commands to generate.