aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2025-07-12 10:54:46 +0200
committerJose E. Marchesi <jose.marchesi@oracle.com>2025-07-12 11:33:25 +0200
commit3e97860c29ae2aee5644fd10cf868d2f1f5c9703 (patch)
tree23f7048f04d4f686e05da7f2cce2f8b110438bc4
parent3b6b69205c547dd71ac0b92f9d68e1c145ff93bf (diff)
downloadbinutils-3e97860c29ae2aee5644fd10cf868d2f1f5c9703.zip
binutils-3e97860c29ae2aee5644fd10cf868d2f1f5c9703.tar.gz
binutils-3e97860c29ae2aee5644fd10cf868d2f1f5c9703.tar.bz2
binutils: generalize init_dwarf_regnames_by_* functions
This patch renames the functions: init_dwarf_regnames_by_elf_machine_code init_dwarf_regnames_by_bfd_arch_and_mach to init_dwarf_by_elf_machine_code init_dwarf_by_bfd_arch_and_mach The idea is to start using these functions to perform general architecture/machine specific initializations beyond register names. Regtested in x86_64-linux-gnu and aarch64-linux-gnu targets. binutils/ChangeLog: * dwarf.c (init_dwarf_regnames_by_elf_machine_code): Rename to init_dwarf_by_elf_machine_code. (init_dwarf_regnames_by_bfd_arch_and_mach): Rename to init_dwarf_by_bfd_arch_and_mach. * dwarf.h: Adjust prototypes accordingly. * readelf.c (process_file_header): Adjust call to init_dwarf_regnames_by_elf_machine_code accordingly. * objdump.c (dump_dwarf): Adjust call to init_dwarf_regnames_by_bfd_arch_and_mach accordingly.
-rw-r--r--binutils/dwarf.c6
-rw-r--r--binutils/dwarf.h6
-rw-r--r--binutils/objdump.c4
-rw-r--r--binutils/readelf.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index e0e202f..89594b5 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -8895,7 +8895,7 @@ init_dwarf_regnames_loongarch (void)
}
void
-init_dwarf_regnames_by_elf_machine_code (unsigned int e_machine)
+init_dwarf_by_elf_machine_code (unsigned int e_machine)
{
dwarf_regnames_lookup_func = NULL;
is_aarch64 = false;
@@ -8941,8 +8941,8 @@ init_dwarf_regnames_by_elf_machine_code (unsigned int e_machine)
architecture and specific machine type of a BFD. */
void
-init_dwarf_regnames_by_bfd_arch_and_mach (enum bfd_architecture arch,
- unsigned long mach)
+init_dwarf_by_bfd_arch_and_mach (enum bfd_architecture arch,
+ unsigned long mach)
{
dwarf_regnames_lookup_func = NULL;
is_aarch64 = false;
diff --git a/binutils/dwarf.h b/binutils/dwarf.h
index 6f693b1..13afb4a 100644
--- a/binutils/dwarf.h
+++ b/binutils/dwarf.h
@@ -241,9 +241,9 @@ extern unsigned long dwarf_start_die;
extern int dwarf_check;
-extern void init_dwarf_regnames_by_elf_machine_code (unsigned int);
-extern void init_dwarf_regnames_by_bfd_arch_and_mach (enum bfd_architecture arch,
- unsigned long mach);
+extern void init_dwarf_by_elf_machine_code (unsigned int);
+extern void init_dwarf_by_bfd_arch_and_mach (enum bfd_architecture arch,
+ unsigned long mach);
extern bool load_debug_section (enum dwarf_section_display_enum, void *);
extern void free_debug_section (enum dwarf_section_display_enum);
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 7bb6d76..98d3049 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -4551,8 +4551,8 @@ dump_dwarf (bfd *abfd, bool is_mainfile)
break;
}
- init_dwarf_regnames_by_bfd_arch_and_mach (bfd_get_arch (abfd),
- bfd_get_mach (abfd));
+ init_dwarf_by_bfd_arch_and_mach (bfd_get_arch (abfd),
+ bfd_get_mach (abfd));
bfd_map_over_sections (abfd, dump_dwarf_section, (void *) &is_mainfile);
}
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 87615d9..4a3307e 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -6828,7 +6828,7 @@ process_file_header (Filedata * filedata)
return false;
if (! filedata->is_separate)
- init_dwarf_regnames_by_elf_machine_code (header->e_machine);
+ init_dwarf_by_elf_machine_code (header->e_machine);
if (do_header)
{