extern bfd_reloc_status_type bfd_elf_generic_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
extern bool bfd_elf_allocate_object
- (bfd *, size_t, enum elf_target_id);
+ (bfd *, size_t);
extern bool bfd_elf_make_object
(bfd *);
extern bool bfd_elf_mkcorefile
static bool
mn10300_elf_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct elf_mn10300_obj_tdata),
- MN10300_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_mn10300_obj_tdata));
}
#define bfd_elf32_mkobject mn10300_elf_mkobject
}
/* Create a tdata field OBJECT_SIZE bytes in length, zeroed out and with
- the object_id field of an elf_obj_tdata field set to OBJECT_ID. */
+ the object_id field of an elf_obj_tdata field set. */
bool
bfd_elf_allocate_object (bfd *abfd,
- size_t object_size,
- enum elf_target_id object_id)
+ size_t object_size)
{
BFD_ASSERT (object_size >= sizeof (struct elf_obj_tdata));
abfd->tdata.any = bfd_zalloc (abfd, object_size);
if (abfd->tdata.any == NULL)
return false;
- elf_object_id (abfd) = object_id;
+ elf_object_id (abfd) = get_elf_backend_data (abfd)->target_id;
if (abfd->direction != read_direction)
{
struct output_elf_obj_tdata *o = bfd_zalloc (abfd, sizeof *o);
bool
bfd_elf_make_object (bfd *abfd)
{
- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- return bfd_elf_allocate_object (abfd, sizeof (struct elf_obj_tdata),
- bed->target_id);
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_obj_tdata));
}
bool
static bool
elf32_arm_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct elf_arm_obj_tdata),
- ARM_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_arm_obj_tdata));
}
#define elf32_arm_hash_entry(ent) ((struct elf32_arm_link_hash_entry *)(ent))
static bool
csky_elf_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct csky_elf_obj_tdata),
- CSKY_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct csky_elf_obj_tdata));
}
/* Adjust a symbol defined by a dynamic object and referenced by a
static bool
nds32_elf_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct elf_nds32_obj_tdata),
- NDS32_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_nds32_obj_tdata));
}
/* Relocations used for relocation. */
static bool
elf_or1k_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct elf_or1k_obj_tdata),
- OR1K_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_or1k_obj_tdata));
}
/* Create an entry in an or1k ELF linker hash table. */
static bool
ppc_elf_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct ppc_elf_obj_tdata),
- PPC32_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct ppc_elf_obj_tdata));
}
/* When defaulting arch/mach, decode apuinfo to find a better match. */
static bool
elf_s390_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct elf_s390_obj_tdata),
- S390_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_s390_obj_tdata));
}
static bool
static bool
sh_elf_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct sh_elf_obj_tdata),
- SH_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct sh_elf_obj_tdata));
}
/* sh ELF linker hash table. */
{
bool ret;
- ret = bfd_elf_allocate_object (abfd, sizeof (struct elf32_tic6x_obj_tdata),
- TIC6X_ELF_DATA);
+ ret = bfd_elf_allocate_object (abfd, sizeof (struct elf32_tic6x_obj_tdata));
if (ret)
elf32_tic6x_set_use_rela_p (abfd, true);
return ret;
tilepro_elf_mkobject (bfd *abfd)
{
return bfd_elf_allocate_object (abfd,
- sizeof (struct _bfd_tilepro_elf_obj_tdata),
- TILEPRO_ELF_DATA);
+ sizeof (struct _bfd_tilepro_elf_obj_tdata));
}
#include "elf/common.h"
static bool
elf_xtensa_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct elf_xtensa_obj_tdata),
- XTENSA_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_xtensa_obj_tdata));
}
/* Xtensa ELF linker hash table. */
static bool
elf64_alpha_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct alpha_elf_obj_tdata),
- ALPHA_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct alpha_elf_obj_tdata));
}
static bool
static bool
elf64_ia64_vms_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object
- (abfd, sizeof (struct elf64_ia64_vms_obj_tdata), IA64_ELF_DATA);
+ return bfd_elf_allocate_object (abfd,
+ sizeof (struct elf64_ia64_vms_obj_tdata));
}
static bool
ppc64_elf_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct ppc64_elf_obj_tdata),
- PPC64_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct ppc64_elf_obj_tdata));
}
/* Fix bad default arch selected for a 64 bit input bfd when the
static bool
elf_s390_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct elf_s390_obj_tdata),
- S390_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_s390_obj_tdata));
}
static bool
static bool
elfNN_aarch64_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct elf_aarch64_obj_tdata),
- AARCH64_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_aarch64_obj_tdata));
}
#define elf_aarch64_hash_entry(ent) \
static bool
elfNN_kvx_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct elf_kvx_obj_tdata),
- KVX_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_kvx_obj_tdata));
}
#define elf_kvx_hash_entry(ent) \
elfNN_loongarch_object (bfd *abfd)
{
return bfd_elf_allocate_object (abfd,
- sizeof (struct _bfd_loongarch_elf_obj_tdata),
- LARCH_ELF_DATA);
+ sizeof (struct _bfd_loongarch_elf_obj_tdata));
}
struct relr_entry
elfNN_riscv_mkobject (bfd *abfd)
{
return bfd_elf_allocate_object (abfd,
- sizeof (struct _bfd_riscv_elf_obj_tdata),
- RISCV_ELF_DATA);
+ sizeof (struct _bfd_riscv_elf_obj_tdata));
}
#include "elf/common.h"
bool
_bfd_mips_elf_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct mips_elf_obj_tdata),
- MIPS_ELF_DATA);
+ return bfd_elf_allocate_object (abfd, sizeof (struct mips_elf_obj_tdata));
}
/* MIPS ELF uses a special find_nearest_line routine in order the
bool
_bfd_sparc_elf_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd, sizeof (struct _bfd_sparc_elf_obj_tdata),
- SPARC_ELF_DATA);
+ return bfd_elf_allocate_object (abfd,
+ sizeof (struct _bfd_sparc_elf_obj_tdata));
}
static void
bool
_bfd_x86_elf_mkobject (bfd *abfd)
{
- return bfd_elf_allocate_object (abfd,
- sizeof (struct elf_x86_obj_tdata),
- get_elf_backend_data (abfd)->target_id);
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_x86_obj_tdata));
}
/* _TLS_MODULE_BASE_ needs to be treated especially when linking