From e6f7f6d14f7e1acba0cf41726616a270e7d3c121 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 18 Sep 2019 16:25:19 +0930 Subject: bfd_asymbol_* macros The main point of this patch is to give bfd_get_section a better name, bfd_asymbol_section. bfd/ * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section. (bfd_get_output_section): Delete. (bfd_asymbol_base): Delete. (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name), (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy. (bfd_set_asymbol_name): New macro. * bfd-in2.h: Regenerate. * aout-cris.c: Update throughout to use bfd_asymbol_section. * aoutx.h: Likewise. * cofflink.c: Likewise. * dwarf2.c: Likewise. * ecoff.c: Likewise. * elf.c: Likewise. * elf32-arm.c: Likewise. * elf32-mips.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elfn32-mips.c: Likewise. * elfnn-aarch64.c: Likewise. * elfxx-mips.c: Likewise. * linker.c: Likewise. * pdp11.c: Likewise. * elf64-mmix.c (mmix_elf_reloc): Expand bfd_get_output_section. binutils/ * nm.c: Update bfd_get_section to bfd_asymbol_section throughout. * objcopy.c: Likewise. * objdump.c: Likewise. * rdcoff.c: Likewise. * objcopy.c (create_new_symbol): Use bfd_set_asymbol_name. (filter_symbols): Likewise. gas/ * symbols.c (S_IS_LOCAL): Update bfd_get_section to bfd_asymbol_section. gdb/ * arm-tdep.c (arm_record_special_symbol): Update bfd_get_section to bfd_asymbol_section. ld/ * ldcref.c (check_reloc_refs): Update bfd_get_section to bfd_asymbol_section. --- binutils/objdump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'binutils/objdump.c') diff --git a/binutils/objdump.c b/binutils/objdump.c index 00541cb..4a7c8f9 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -995,7 +995,7 @@ objdump_print_symname (bfd *abfd, struct disassemble_info *inf, if ((sym->flags & (BSF_SECTION_SYM | BSF_SYNTHETIC)) == 0) version_string = bfd_get_symbol_version_string (abfd, sym, &hidden); - if (bfd_is_und_section (bfd_get_section (sym))) + if (bfd_is_und_section (bfd_asymbol_section (sym))) hidden = TRUE; name = sanitize_string (name); @@ -1351,7 +1351,7 @@ objdump_print_addr (bfd_vma vma, /* Adjust the vma to the reloc. */ vma += bfd_asymbol_value (sym); - if (bfd_is_und_section (bfd_get_section (sym))) + if (bfd_is_und_section (bfd_asymbol_section (sym))) skip_find = TRUE; } @@ -2234,7 +2234,7 @@ disassemble_bytes (struct disassemble_info * inf, { asection *sym_sec; - sym_sec = bfd_get_section (*q->sym_ptr_ptr); + sym_sec = bfd_asymbol_section (*q->sym_ptr_ptr); sym_name = bfd_get_section_name (aux->abfd, sym_sec); if (sym_name == NULL || *sym_name == '\0') sym_name = "*unknown*"; -- cgit v1.1