diff options
author | Alan Modra <amodra@gmail.com> | 2019-09-18 15:07:33 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-09-18 22:21:58 +0930 |
commit | ed48ec2e6ec5514f01b9b3a810d6ddf39651114b (patch) | |
tree | 68111a47a8fbf5230be398cb68fe84840ab0d099 /bfd | |
parent | 01c2b26160575ad4add68da8a043b3fa30defae4 (diff) | |
download | binutils-gdb-ed48ec2e6ec5514f01b9b3a810d6ddf39651114b.tar.gz |
Don't use bfd_get_* macro to set bfd fields
* 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.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 42 | ||||
-rw-r--r-- | bfd/aoutx.h | 6 | ||||
-rw-r--r-- | bfd/archive.c | 6 | ||||
-rw-r--r-- | bfd/archive64.c | 4 | ||||
-rw-r--r-- | bfd/bfd.c | 2 | ||||
-rw-r--r-- | bfd/coff-ppc.c | 4 | ||||
-rw-r--r-- | bfd/coff-rs6000.c | 8 | ||||
-rw-r--r-- | bfd/coff64-rs6000.c | 6 | ||||
-rw-r--r-- | bfd/coffcode.h | 2 | ||||
-rw-r--r-- | bfd/coffgen.c | 8 | ||||
-rw-r--r-- | bfd/cofflink.c | 4 | ||||
-rw-r--r-- | bfd/ecoff.c | 15 | ||||
-rw-r--r-- | bfd/elf.c | 4 | ||||
-rw-r--r-- | bfd/elfcore.h | 2 | ||||
-rw-r--r-- | bfd/elflink.c | 6 | ||||
-rw-r--r-- | bfd/linker.c | 15 | ||||
-rw-r--r-- | bfd/pdp11.c | 6 | ||||
-rw-r--r-- | bfd/peicode.h | 2 | ||||
-rw-r--r-- | bfd/som.c | 12 | ||||
-rw-r--r-- | bfd/syms.c | 4 | ||||
-rw-r--r-- | bfd/vms-alpha.c | 4 | ||||
-rw-r--r-- | bfd/xcofflink.c | 4 |
22 files changed, 103 insertions, 63 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 820c3bd5d78..32c57b79634 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,47 @@ 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. (bfd_get_mach, bfd_arch_bits_per_byte): Likewise. (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise. diff --git a/bfd/aoutx.h b/bfd/aoutx.h index e5d8dcf3907..cd50b44e60a 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -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; diff --git a/bfd/archive.c b/bfd/archive.c index ef71e8a7963..dc0400d1cf6 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -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; } diff --git a/bfd/archive64.c b/bfd/archive64.c index a2c628e2b55..37fecc28d48 100644 --- a/bfd/archive64.c +++ b/bfd/archive64.c @@ -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; diff --git a/bfd/bfd.c b/bfd/bfd.c index 91403508a9a..c973c780b40 100644 --- 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); diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c index 40824c5cb06..ab5c2c837c1 100644 --- a/bfd/coff-ppc.c +++ b/bfd/coff-ppc.c @@ -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; diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index 4620254aaef..bdbb499a4ab 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -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; } diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c index b6b189fd2d7..1c80a9df885 100644 --- a/bfd/coff64-rs6000.c +++ b/bfd/coff64-rs6000.c @@ -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; } diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 054e45c960b..dd3189fbd3d 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -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. */ { diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 209b01d5d01..80a9a2ab9ae 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -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; } diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 5e027601543..34d68c93b5d 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -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; diff --git a/bfd/ecoff.c b/bfd/ecoff.c index f9844b3b4b0..1e6f4d219cd 100644 --- a/bfd/ecoff.c +++ b/bfd/ecoff.c @@ -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; diff --git a/bfd/elf.c b/bfd/elf.c index ec4c643d59a..ecd348e1a50 100644 --- 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; } diff --git a/bfd/elfcore.h b/bfd/elfcore.h index 395feb5ef38..3550eaac272 100644 --- a/bfd/elfcore.h +++ b/bfd/elfcore.h @@ -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: diff --git a/bfd/elflink.c b/bfd/elflink.c index 16d83bb7a30..8f18be07db7 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -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; diff --git a/bfd/linker.c b/bfd/linker.c index f6eef93259b..8aec0d23588 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -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; } diff --git a/bfd/pdp11.c b/bfd/pdp11.c index 1d34047fdc0..f7f31284095 100644 --- a/bfd/pdp11.c +++ b/bfd/pdp11.c @@ -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; diff --git a/bfd/peicode.h b/bfd/peicode.h index 2a564fec984..679474ecd15 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -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; diff --git a/bfd/som.c b/bfd/som.c index cf788434523..4c9dcaee676 100644 --- 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; } diff --git a/bfd/syms.c b/bfd/syms.c index da1c90d52eb..4d532b2cd21 100644 --- a/bfd/syms.c +++ b/bfd/syms.c @@ -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; } diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index 69822a2ce6a..8d2a2dff623 100644 --- a/bfd/vms-alpha.c +++ b/bfd/vms-alpha.c @@ -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) diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index f9c12e40f34..1a2f87c4b00 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -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; |