aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-12-18 18:39:34 +1030
committerAlan Modra <amodra@gmail.com>2024-12-19 08:06:37 +1030
commitf92b077ee7d43b2b344e6942ffed6667c60ede0d (patch)
tree5014be67dc634da1ae16a5dcda66e180b44426ad /bfd
parenta9baa81f50258d388e78a680a3da233c9e1a3d26 (diff)
downloadbinutils-f92b077ee7d43b2b344e6942ffed6667c60ede0d.zip
binutils-f92b077ee7d43b2b344e6942ffed6667c60ede0d.tar.gz
binutils-f92b077ee7d43b2b344e6942ffed6667c60ede0d.tar.bz2
Remove _bfd_elf_link_hash_table_init target_id param
hash_table_id can be set from elf_backend_data, now that all targets have matching ELF_TARGET_ID and hash_table_init target_id.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/elf-bfd.h2
-rw-r--r--bfd/elf-m10300.c6
-rw-r--r--bfd/elf32-arc.c3
-rw-r--r--bfd/elf32-arm.c3
-rw-r--r--bfd/elf32-avr.c3
-rw-r--r--bfd/elf32-bfin.c6
-rw-r--r--bfd/elf32-cr16.c3
-rw-r--r--bfd/elf32-cris.c3
-rw-r--r--bfd/elf32-csky.c3
-rw-r--r--bfd/elf32-frv.c3
-rw-r--r--bfd/elf32-hppa.c3
-rw-r--r--bfd/elf32-lm32.c3
-rw-r--r--bfd/elf32-m32r.c3
-rw-r--r--bfd/elf32-m68hc1x.c3
-rw-r--r--bfd/elf32-m68k.c3
-rw-r--r--bfd/elf32-metag.c3
-rw-r--r--bfd/elf32-microblaze.c3
-rw-r--r--bfd/elf32-nds32.c3
-rw-r--r--bfd/elf32-or1k.c3
-rw-r--r--bfd/elf32-ppc.c3
-rw-r--r--bfd/elf32-pru.c7
-rw-r--r--bfd/elf32-s390.c3
-rw-r--r--bfd/elf32-score.c3
-rw-r--r--bfd/elf32-sh.c3
-rw-r--r--bfd/elf32-spu.c3
-rw-r--r--bfd/elf32-tic6x.c3
-rw-r--r--bfd/elf32-tilepro.c3
-rw-r--r--bfd/elf32-vax.c3
-rw-r--r--bfd/elf32-xtensa.c3
-rw-r--r--bfd/elf64-alpha.c3
-rw-r--r--bfd/elf64-hppa.c3
-rw-r--r--bfd/elf64-ia64-vms.c3
-rw-r--r--bfd/elf64-ppc.c3
-rw-r--r--bfd/elf64-s390.c3
-rw-r--r--bfd/elflink.c13
-rw-r--r--bfd/elfnn-aarch64.c2
-rw-r--r--bfd/elfnn-ia64.c3
-rw-r--r--bfd/elfnn-kvx.c2
-rw-r--r--bfd/elfnn-loongarch.c2
-rw-r--r--bfd/elfnn-riscv.c3
-rw-r--r--bfd/elfxx-mips.c3
-rw-r--r--bfd/elfxx-sparc.c3
-rw-r--r--bfd/elfxx-tilegx.c3
-rw-r--r--bfd/elfxx-x86.c6
44 files changed, 53 insertions, 98 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 2f11bc2..3048d63 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2344,7 +2344,7 @@ extern bool _bfd_elf_link_hash_table_init
(struct elf_link_hash_table *, bfd *,
struct bfd_hash_entry *(*)
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *),
- unsigned int, enum elf_target_id);
+ unsigned int);
extern bool _bfd_elf_slurp_version_tables
(bfd *, bool);
extern bool _bfd_elf_merge_sections
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index aa387fc..b412a0c 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -4618,8 +4618,7 @@ elf32_mn10300_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->static_hash_table->root, abfd,
elf32_mn10300_link_hash_newfunc,
- sizeof (struct elf32_mn10300_link_hash_entry),
- MN10300_ELF_DATA))
+ sizeof (struct elf32_mn10300_link_hash_entry)))
{
free (ret->static_hash_table);
free (ret);
@@ -4630,8 +4629,7 @@ elf32_mn10300_link_hash_table_create (bfd *abfd)
abfd->link.hash = NULL;
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
elf32_mn10300_link_hash_newfunc,
- sizeof (struct elf32_mn10300_link_hash_entry),
- MN10300_ELF_DATA))
+ sizeof (struct elf32_mn10300_link_hash_entry)))
{
abfd->is_linker_output = true;
abfd->link.hash = &ret->static_hash_table->root.root;
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index bd18299..d151f04 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -363,8 +363,7 @@ arc_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
elf_arc_link_hash_newfunc,
- sizeof (struct elf_arc_link_hash_entry),
- ARC_ELF_DATA))
+ sizeof (struct elf_arc_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index a4c2321..74090d4 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -4102,8 +4102,7 @@ elf32_arm_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (& ret->root, abfd,
elf32_arm_link_hash_newfunc,
- sizeof (struct elf32_arm_link_hash_entry),
- ARM_ELF_DATA))
+ sizeof (struct elf32_arm_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 12b68ba..12c9c10 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -877,8 +877,7 @@ elf32_avr_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&htab->etab, abfd,
elf32_avr_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry),
- AVR_ELF_DATA))
+ sizeof (struct elf_link_hash_entry)))
{
free (htab);
return NULL;
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index f0e650d..ba605e8 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -1742,8 +1742,7 @@ bfinfdpic_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
_bfd_elf_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry),
- BFIN_ELF_DATA))
+ sizeof (struct elf_link_hash_entry)))
{
free (ret);
return NULL;
@@ -4837,8 +4836,7 @@ bfin_link_hash_table_create (bfd * abfd)
return NULL;
if (!_bfd_elf_link_hash_table_init (ret, abfd, bfin_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry),
- BFIN_ELF_DATA))
+ sizeof (struct elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c
index f622fc7..26200e6 100644
--- a/bfd/elf32-cr16.c
+++ b/bfd/elf32-cr16.c
@@ -1617,8 +1617,7 @@ elf32_cr16_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (ret, abfd,
elf32_cr16_link_hash_newfunc,
- sizeof (struct elf32_cr16_link_hash_entry),
- GENERIC_ELF_DATA))
+ sizeof (struct elf32_cr16_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 8b10dae..9e5caac 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -898,8 +898,7 @@ elf_cris_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
elf_cris_link_hash_newfunc,
- sizeof (struct elf_cris_link_hash_entry),
- CRIS_ELF_DATA))
+ sizeof (struct elf_cris_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c
index 0911a3f..0bdb37f 100644
--- a/bfd/elf32-csky.c
+++ b/bfd/elf32-csky.c
@@ -1502,8 +1502,7 @@ csky_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
csky_elf_link_hash_newfunc,
- sizeof (struct csky_elf_link_hash_entry),
- CSKY_ELF_DATA))
+ sizeof (struct csky_elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 718b7da..d771213 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -951,8 +951,7 @@ frvfdpic_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
_bfd_elf_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry),
- FRV_ELF_DATA))
+ sizeof (struct elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 4d00432..38f9569 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -418,8 +418,7 @@ elf32_hppa_link_hash_table_create (bfd *abfd)
return NULL;
if (!_bfd_elf_link_hash_table_init (&htab->etab, abfd, hppa_link_hash_newfunc,
- sizeof (struct elf32_hppa_link_hash_entry),
- HPPA32_ELF_DATA))
+ sizeof (struct elf32_hppa_link_hash_entry)))
{
free (htab);
return NULL;
diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c
index e62e5fd..d2dfa5b 100644
--- a/bfd/elf32-lm32.c
+++ b/bfd/elf32-lm32.c
@@ -98,8 +98,7 @@ lm32_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
_bfd_elf_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry),
- LM32_ELF_DATA))
+ sizeof (struct elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index a02645a..99f4b77 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -1517,8 +1517,7 @@ m32r_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (ret, abfd,
_bfd_elf_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry),
- M32R_ELF_DATA))
+ sizeof (struct elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 6ac21f4..87a3f82 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -84,8 +84,7 @@ m68hc11_elf_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
_bfd_elf_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry),
- M68HC11_ELF_DATA))
+ sizeof (struct elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 6355ae9..58583d6 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -977,8 +977,7 @@ elf_m68k_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
elf_m68k_link_hash_newfunc,
- sizeof (struct elf_m68k_link_hash_entry),
- M68K_ELF_DATA))
+ sizeof (struct elf_m68k_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
index 2821be4..1141c7c 100644
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
@@ -1022,8 +1022,7 @@ elf_metag_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&htab->etab, abfd,
metag_link_hash_newfunc,
- sizeof (struct elf_metag_link_hash_entry),
- METAG_ELF_DATA))
+ sizeof (struct elf_metag_link_hash_entry)))
{
free (htab);
return NULL;
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index b500242..df12414 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -857,8 +857,7 @@ microblaze_elf_link_hash_table_create (bfd *abfd)
return NULL;
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
- sizeof (struct elf32_mb_link_hash_entry),
- MICROBLAZE_ELF_DATA))
+ sizeof (struct elf32_mb_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c
index eb3e241..def09db 100644
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
@@ -3738,8 +3738,7 @@ nds32_elf_link_hash_table_create (bfd *abfd)
/* Patch tag. */
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
nds32_elf_link_hash_newfunc,
- sizeof (struct elf_nds32_link_hash_entry),
- NDS32_ELF_DATA))
+ sizeof (struct elf_nds32_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c
index f6c9220..1680e42 100644
--- a/bfd/elf32-or1k.c
+++ b/bfd/elf32-or1k.c
@@ -1028,8 +1028,7 @@ or1k_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
or1k_elf_link_hash_newfunc,
- sizeof (struct elf_or1k_link_hash_entry),
- OR1K_ELF_DATA))
+ sizeof (struct elf_or1k_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 8c89ae1..9b62554 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2279,8 +2279,7 @@ ppc_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
ppc_elf_link_hash_newfunc,
- sizeof (struct ppc_elf_link_hash_entry),
- PPC32_ELF_DATA))
+ sizeof (struct ppc_elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-pru.c b/bfd/elf32-pru.c
index e76b483..e51e8b6 100644
--- a/bfd/elf32-pru.c
+++ b/bfd/elf32-pru.c
@@ -1559,11 +1559,8 @@ pru_elf32_link_hash_table_create (bfd *abfd)
if (ret == NULL)
return NULL;
- if (!_bfd_elf_link_hash_table_init (ret, abfd,
- link_hash_newfunc,
- sizeof (struct
- elf_link_hash_entry),
- PRU_ELF_DATA))
+ if (!_bfd_elf_link_hash_table_init (ret, abfd, link_hash_newfunc,
+ sizeof (struct elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 702b023..565ce1f 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -804,8 +804,7 @@ elf_s390_link_hash_table_create (bfd *abfd)
return NULL;
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
- sizeof (struct elf_s390_link_hash_entry),
- S390_ELF_DATA))
+ sizeof (struct elf_s390_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c
index 76e8761..34fc5df 100644
--- a/bfd/elf32-score.c
+++ b/bfd/elf32-score.c
@@ -4364,8 +4364,7 @@ elf32_score_link_hash_table_create (bfd *abfd)
return NULL;
if (!_bfd_elf_link_hash_table_init (ret, abfd, score_elf_link_hash_newfunc,
- sizeof (struct score_elf_link_hash_entry),
- SCORE_ELF_DATA))
+ sizeof (struct score_elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index ecb46bb..18d803d 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -2244,8 +2244,7 @@ sh_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
sh_elf_link_hash_newfunc,
- sizeof (struct elf_sh_link_hash_entry),
- SH_ELF_DATA))
+ sizeof (struct elf_sh_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index f65a008..fbf5331 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -458,8 +458,7 @@ spu_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&htab->elf, abfd,
_bfd_elf_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry),
- SPU_ELF_DATA))
+ sizeof (struct elf_link_hash_entry)))
{
free (htab);
return NULL;
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
index dee7527..e8d04b0 100644
--- a/bfd/elf32-tic6x.c
+++ b/bfd/elf32-tic6x.c
@@ -1563,8 +1563,7 @@ elf32_tic6x_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
_bfd_elf_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry),
- TIC6X_ELF_DATA))
+ sizeof (struct elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c
index 0c187c0..eabb456 100644
--- a/bfd/elf32-tilepro.c
+++ b/bfd/elf32-tilepro.c
@@ -1184,8 +1184,7 @@ tilepro_elf_link_hash_table_create (bfd *abfd)
return NULL;
if (!_bfd_elf_link_hash_table_init (ret, abfd, link_hash_newfunc,
- sizeof (struct tilepro_elf_link_hash_entry),
- TILEPRO_ELF_DATA))
+ sizeof (struct tilepro_elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 5107a4a..5d534f8 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -476,8 +476,7 @@ elf_vax_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (ret, abfd,
elf_vax_link_hash_newfunc,
- sizeof (struct elf_vax_link_hash_entry),
- GENERIC_ELF_DATA))
+ sizeof (struct elf_vax_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 9682438..607b64c 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -741,8 +741,7 @@ elf_xtensa_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
elf_xtensa_link_hash_newfunc,
- sizeof (struct elf_xtensa_link_hash_entry),
- XTENSA_ELF_DATA))
+ sizeof (struct elf_xtensa_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index a29913d..f1ec344 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -289,8 +289,7 @@ elf64_alpha_bfd_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
elf64_alpha_link_hash_newfunc,
- sizeof (struct alpha_elf_link_hash_entry),
- ALPHA_ELF_DATA))
+ sizeof (struct alpha_elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 2d08bf3..f060cd0 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -296,8 +296,7 @@ elf64_hppa_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&htab->root, abfd,
hppa64_link_hash_newfunc,
- sizeof (struct elf64_hppa_link_hash_entry),
- HPPA64_ELF_DATA))
+ sizeof (struct elf64_hppa_link_hash_entry)))
{
free (htab);
return NULL;
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c
index ea778de..5abea38 100644
--- a/bfd/elf64-ia64-vms.c
+++ b/bfd/elf64-ia64-vms.c
@@ -1062,8 +1062,7 @@ elf64_ia64_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
elf64_ia64_new_elf_hash_entry,
- sizeof (struct elf64_ia64_link_hash_entry),
- IA64_ELF_DATA))
+ sizeof (struct elf64_ia64_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index f9964fa..31f25d2 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -3547,8 +3547,7 @@ ppc64_elf_link_hash_table_create (bfd *abfd)
return NULL;
if (!_bfd_elf_link_hash_table_init (&htab->elf, abfd, link_hash_newfunc,
- sizeof (struct ppc_link_hash_entry),
- PPC64_ELF_DATA))
+ sizeof (struct ppc_link_hash_entry)))
{
free (htab);
return NULL;
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index f9d9902..db7ca27 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -723,8 +723,7 @@ elf_s390_link_hash_table_create (bfd *abfd)
return NULL;
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
- sizeof (struct elf_s390_link_hash_entry),
- S390_ELF_DATA))
+ sizeof (struct elf_s390_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 2b9e8b9..34048eb 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -8318,11 +8318,11 @@ _bfd_elf_link_hash_table_init
struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *),
- unsigned int entsize,
- enum elf_target_id target_id)
+ unsigned int entsize)
{
bool ret;
- int can_refcount = get_elf_backend_data (abfd)->can_refcount;
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ int can_refcount = bed->can_refcount;
table->init_got_refcount.refcount = can_refcount - 1;
table->init_plt_refcount.refcount = can_refcount - 1;
@@ -8334,8 +8334,8 @@ _bfd_elf_link_hash_table_init
ret = _bfd_link_hash_table_init (&table->root, abfd, newfunc, entsize);
table->root.type = bfd_link_elf_hash_table;
- table->hash_table_id = target_id;
- table->target_os = get_elf_backend_data (abfd)->target_os;
+ table->hash_table_id = bed->target_id;
+ table->target_os = bed->target_os;
return ret;
}
@@ -8353,8 +8353,7 @@ _bfd_elf_link_hash_table_create (bfd *abfd)
return NULL;
if (! _bfd_elf_link_hash_table_init (ret, abfd, _bfd_elf_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry),
- get_elf_backend_data (abfd)->target_id))
+ sizeof (struct elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 61aabca..85f375a 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -2916,7 +2916,7 @@ elfNN_aarch64_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init
(&ret->root, abfd, elfNN_aarch64_link_hash_newfunc,
- sizeof (struct elf_aarch64_link_hash_entry), AARCH64_ELF_DATA))
+ sizeof (struct elf_aarch64_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c
index 4dabaa7..4244e27 100644
--- a/bfd/elfnn-ia64.c
+++ b/bfd/elfnn-ia64.c
@@ -1460,8 +1460,7 @@ elfNN_ia64_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
elfNN_ia64_new_elf_hash_entry,
- sizeof (struct elfNN_ia64_link_hash_entry),
- IA64_ELF_DATA))
+ sizeof (struct elfNN_ia64_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elfnn-kvx.c b/bfd/elfnn-kvx.c
index e7028dc..49e98e0 100644
--- a/bfd/elfnn-kvx.c
+++ b/bfd/elfnn-kvx.c
@@ -641,7 +641,7 @@ elfNN_kvx_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init
(&ret->root, abfd, elfNN_kvx_link_hash_newfunc,
- sizeof (struct elf_kvx_link_hash_entry), KVX_ELF_DATA))
+ sizeof (struct elf_kvx_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
index e3d3916..d07813c 100644
--- a/bfd/elfnn-loongarch.c
+++ b/bfd/elfnn-loongarch.c
@@ -490,7 +490,7 @@ loongarch_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init
(&ret->elf, abfd, link_hash_newfunc,
- sizeof (struct loongarch_elf_link_hash_entry), LARCH_ELF_DATA))
+ sizeof (struct loongarch_elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 8bbdd15..b120fc6 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -503,8 +503,7 @@ riscv_elf_link_hash_table_create (bfd *abfd)
return NULL;
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
- sizeof (struct riscv_elf_link_hash_entry),
- RISCV_ELF_DATA))
+ sizeof (struct riscv_elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 459c98e..f855763 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -14444,8 +14444,7 @@ _bfd_mips_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
mips_elf_link_hash_newfunc,
- sizeof (struct mips_elf_link_hash_entry),
- MIPS_ELF_DATA))
+ sizeof (struct mips_elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 3f642ae..344d10d 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -1178,8 +1178,7 @@ _bfd_sparc_elf_link_hash_table_create (bfd *abfd)
}
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
- sizeof (struct _bfd_sparc_elf_link_hash_entry),
- SPARC_ELF_DATA))
+ sizeof (struct _bfd_sparc_elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c
index c829792..31e9398 100644
--- a/bfd/elfxx-tilegx.c
+++ b/bfd/elfxx-tilegx.c
@@ -1399,8 +1399,7 @@ tilegx_elf_link_hash_table_create (bfd *abfd)
}
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
- sizeof (struct tilegx_elf_link_hash_entry),
- TILEGX_ELF_DATA))
+ sizeof (struct tilegx_elf_link_hash_entry)))
{
free (ret);
return NULL;
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 0843803..fb223a5 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -720,23 +720,21 @@ struct bfd_link_hash_table *
_bfd_x86_elf_link_hash_table_create (bfd *abfd)
{
struct elf_x86_link_hash_table *ret;
- const struct elf_backend_data *bed;
size_t amt = sizeof (struct elf_x86_link_hash_table);
ret = (struct elf_x86_link_hash_table *) bfd_zmalloc (amt);
if (ret == NULL)
return NULL;
- bed = get_elf_backend_data (abfd);
if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
_bfd_x86_elf_link_hash_newfunc,
- sizeof (struct elf_x86_link_hash_entry),
- bed->target_id))
+ sizeof (struct elf_x86_link_hash_entry)))
{
free (ret);
return NULL;
}
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (bed->target_id == X86_64_ELF_DATA)
{
ret->is_reloc_section = elf_x86_64_is_reloc_section;