aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-03-06 15:23:56 -0800
committerH.J. Lu <hjl.tools@gmail.com>2024-03-08 05:43:51 -0800
commit433b4f8ab7da82f4e8cecf4774722969ce330572 (patch)
treebf4c253c66f66c28b1906ab0b02f350280fe7a97 /bfd
parentdac0b8a4af48e1c5739a19cd5501c7a81bc44ab0 (diff)
downloadgdb-433b4f8ab7da82f4e8cecf4774722969ce330572.zip
gdb-433b4f8ab7da82f4e8cecf4774722969ce330572.tar.gz
gdb-433b4f8ab7da82f4e8cecf4774722969ce330572.tar.bz2
bfd: Don't hard-code BFD_JUMP_TABLE_COPY
In BFD_JUMP_TABLE_COPY, replace _bfd_generic_init_private_section_data with NAME##_init_private_section_data so that ELF targets can properly replace it with _bfd_elf_init_private_section_data. * aout-target.h (MY_init_private_section_data): New. * coff-rs6000.c (_bfd_xcoff_init_private_section_data): New. * coffcode.h (coff_init_private_section_data): New. * elfxx-target.h (bfd_elfNN_init_private_section_data): New. * libecoff.h (_bfd_ecoff_init_private_section_data): New. * mach-o-target.c (bfd_mach_o_init_private_section_data): New. * mmo.c (mmo_init_private_section_data): New. * plugin.c (bfd_plugin_init_private_section_data): New. * ppcboot.c (ppcboot_init_private_section_data): New. * som.c (som_init_private_section_data): New. * targets.c (BFD_JUMP_TABLE_COPY): Replace _bfd_generic_init_private_section_data with NAME##_init_private_section_data. * vms-alpha.c (vms_init_private_section_data): New. * elf-bfd.h (_bfd_generic_init_private_section_data): Removed. * bfd-in2.h: Regenerated.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/aout-target.h3
-rw-r--r--bfd/bfd-in2.h2
-rw-r--r--bfd/coff-rs6000.c2
-rw-r--r--bfd/coffcode.h2
-rw-r--r--bfd/elf-bfd.h2
-rw-r--r--bfd/elfxx-target.h2
-rw-r--r--bfd/libecoff.h3
-rw-r--r--bfd/mach-o-target.c1
-rw-r--r--bfd/mmo.c1
-rw-r--r--bfd/plugin.c1
-rw-r--r--bfd/ppcboot.c1
-rw-r--r--bfd/som.c1
-rw-r--r--bfd/targets.c2
-rw-r--r--bfd/vms-alpha.c1
14 files changed, 20 insertions, 4 deletions
diff --git a/bfd/aout-target.h b/bfd/aout-target.h
index 4a05c60..47fe49f 100644
--- a/bfd/aout-target.h
+++ b/bfd/aout-target.h
@@ -569,6 +569,9 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
#define MY_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
#endif
+#define MY_init_private_section_data \
+ _bfd_generic_init_private_section_data
+
#ifndef MY_bfd_copy_private_symbol_data
#define MY_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
#endif
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index a335df5..79b24a7 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -7685,7 +7685,7 @@ typedef struct bfd_target
#define BFD_JUMP_TABLE_COPY(NAME) \
NAME##_bfd_copy_private_bfd_data, \
NAME##_bfd_merge_private_bfd_data, \
- _bfd_generic_init_private_section_data, \
+ NAME##_init_private_section_data, \
NAME##_bfd_copy_private_section_data, \
NAME##_bfd_copy_private_symbol_data, \
NAME##_bfd_copy_private_header_data, \
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 87feb67..7d04739 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -4471,6 +4471,8 @@ const struct xcoff_dwsect_name xcoff_dwsect_names[] = {
_bfd_generic_get_section_contents_in_window
/* For copy private data entry points. */
+#define _bfd_xcoff_init_private_section_data \
+ _bfd_generic_init_private_section_data
#define _bfd_xcoff_bfd_copy_private_bfd_data \
_bfd_xcoff_copy_private_bfd_data
#define _bfd_xcoff_bfd_merge_private_bfd_data \
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 4170b63..ebf4f51 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -5968,6 +5968,8 @@ static const bfd_coff_backend_data bigobj_swap_table =
#define coff_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
#endif
+#define coff_init_private_section_data _bfd_generic_init_private_section_data
+
#ifndef coff_bfd_copy_private_section_data
#define coff_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data
#endif
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 3ed22fa..c5d3254 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2359,8 +2359,6 @@ extern bool _bfd_elf_copy_private_header_data
(bfd *, bfd *);
extern bool _bfd_elf_copy_private_symbol_data
(bfd *, asymbol *, bfd *, asymbol *);
-#define _bfd_generic_init_private_section_data \
- _bfd_elf_init_private_section_data
extern bool _bfd_elf_init_private_section_data
(bfd *, asection *, bfd *, asection *, struct bfd_link_info *);
extern bool _bfd_elf_copy_private_section_data
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index a7f2fc6..1e6992b 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -230,6 +230,8 @@
_bfd_elf_copy_private_symbol_data
#endif
+#define bfd_elfNN_init_private_section_data \
+ _bfd_elf_init_private_section_data
#ifndef bfd_elfNN_bfd_copy_private_section_data
#define bfd_elfNN_bfd_copy_private_section_data \
_bfd_elf_copy_private_section_data
diff --git a/bfd/libecoff.h b/bfd/libecoff.h
index 5e6de3c..50a0af7 100644
--- a/bfd/libecoff.h
+++ b/bfd/libecoff.h
@@ -250,6 +250,9 @@ extern bool _bfd_ecoff_get_section_contents
#define _bfd_ecoff_bfd_link_split_section _bfd_generic_link_split_section
#define _bfd_ecoff_bfd_link_check_relocs _bfd_generic_link_check_relocs
+#define _bfd_ecoff_init_private_section_data \
+ _bfd_generic_init_private_section_data
+
extern bool _bfd_ecoff_bfd_copy_private_bfd_data
(bfd *, bfd *);
#define _bfd_ecoff_bfd_copy_private_section_data \
diff --git a/bfd/mach-o-target.c b/bfd/mach-o-target.c
index 01666d3..6edb09f 100644
--- a/bfd/mach-o-target.c
+++ b/bfd/mach-o-target.c
@@ -75,6 +75,7 @@
#define bfd_mach_o_write_armap _bfd_noarchive_write_armap
#define bfd_mach_o_get_elt_at_index _bfd_noarchive_get_elt_at_index
#define bfd_mach_o_update_armap_timestamp _bfd_noarchive_update_armap_timestamp
+#define bfd_mach_o_init_private_section_data _bfd_generic_init_private_section_data
#define TARGET_NAME_BACKEND XCONCAT2(TARGET_NAME,_backend)
diff --git a/bfd/mmo.c b/bfd/mmo.c
index 485a1c3..528de1d 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -3360,6 +3360,7 @@ mmo_write_object_contents (bfd *abfd)
#define mmo_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
#define mmo_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
#define mmo_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
+#define mmo_init_private_section_data _bfd_generic_init_private_section_data
const bfd_target mmix_mmo_vec =
{
diff --git a/bfd/plugin.c b/bfd/plugin.c
index 784a3c1..8226c26 100644
--- a/bfd/plugin.c
+++ b/bfd/plugin.c
@@ -74,6 +74,7 @@ dlerror (void)
#define bfd_plugin_new_section_hook _bfd_generic_new_section_hook
#define bfd_plugin_get_section_contents _bfd_generic_get_section_contents
#define bfd_plugin_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
+#define bfd_plugin_init_private_section_data _bfd_generic_init_private_section_data
#define bfd_plugin_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
#define bfd_plugin_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
#define bfd_plugin_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
diff --git a/bfd/ppcboot.c b/bfd/ppcboot.c
index 461050c..2e94777 100644
--- a/bfd/ppcboot.c
+++ b/bfd/ppcboot.c
@@ -476,6 +476,7 @@ ppcboot_bfd_print_private_bfd_data (bfd *abfd, void * farg)
#define ppcboot_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
#define ppcboot_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
+#define ppcboot_init_private_section_data _bfd_generic_init_private_section_data
#define ppcboot_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data
#define ppcboot_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
#define ppcboot_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
diff --git a/bfd/som.c b/bfd/som.c
index 17c9d71..dc641e7 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -6782,6 +6782,7 @@ som_bfd_link_split_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
#define som_bfd_link_hide_symbol _bfd_generic_link_hide_symbol
#define som_bfd_define_start_stop bfd_generic_define_start_stop
#define som_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
+#define som_init_private_section_data _bfd_generic_init_private_section_data
#define som_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
#define som_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
#define som_find_inliner_info _bfd_nosymbols_find_inliner_info
diff --git a/bfd/targets.c b/bfd/targets.c
index 3addf2f..f94992d 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -285,7 +285,7 @@ BFD_JUMP_TABLE macros.
.#define BFD_JUMP_TABLE_COPY(NAME) \
. NAME##_bfd_copy_private_bfd_data, \
. NAME##_bfd_merge_private_bfd_data, \
-. _bfd_generic_init_private_section_data, \
+. NAME##_init_private_section_data, \
. NAME##_bfd_copy_private_section_data, \
. NAME##_bfd_copy_private_symbol_data, \
. NAME##_bfd_copy_private_header_data, \
diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c
index f5ecdcb..ace5a24 100644
--- a/bfd/vms-alpha.c
+++ b/bfd/vms-alpha.c
@@ -10129,6 +10129,7 @@ bfd_vms_get_data (bfd *abfd)
#define vms_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
#define vms_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
+#define vms_init_private_section_data _bfd_generic_init_private_section_data
#define vms_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data
#define vms_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
#define vms_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data