Most BFD linker functions take a bfd_link_info param, which reinforces
the fact that they are linker functions and allow access to linker
callbacks, eg. einfo for printing errors. I was going to use einfo
for --fatal-warnings support before I decided a better way was the
patch commit
4519d071.
bfd/
* targets.c (bfd_target <_bfd_merge_private_bfd_data>): Replace
obfd param with struct bfd_link_info param. Update all callers.
* linker.c (bfd_merge_private_bfd_data): Likewise.
(_bfd_generic_verify_endian_match): Likewise.
* aoutf1.h (sunos_merge_private_bfd_data): Likewise.
* coff-arm.c (coff_arm_merge_private_bfd_data): Likewise.
* elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
* elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Likewise.
(_bfd_elf_merge_object_attributes): Likewise.
* elf-m10300.c (_bfd_mn10300_elf_merge_private_bfd_data): Likewise.
* elf-s390-common.c (elf_s390_merge_obj_attributes): Likewise.
* elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Likewise.
(elf32_arm_merge_private_bfd_data): Likewise.
* elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
* elf32-cr16.c (_bfd_cr16_elf_merge_private_bfd_data): Likewise.
* elf32-cris.c (cris_elf_merge_private_bfd_data): Likewise.
* elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
* elf32-h8300.c (elf32_h8_merge_private_bfd_data): Likewise.
* elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
* elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
* elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
* elf32-m32r.c (m32r_elf_merge_private_bfd_data): Likewise.
* elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
* elf32-m68hc1x.h (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
* elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Likewise.
* elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
* elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
* elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Likewise.
(elf32_msp430_merge_private_bfd_data): Likewise.
* elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
* elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
* elf32-nios2.c (nios2_elf32_merge_private_bfd_data): Likewise.
* elf32-or1k.c (elf32_or1k_merge_private_bfd_data): Likewise.
* elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Likewise.
(ppc_elf_merge_obj_attributes): Likewise.
(ppc_elf_merge_private_bfd_data): Likewise.
* elf32-rl78.c (rl78_elf_merge_private_bfd_data): Likewise.
* elf32-rx.c (rx_elf_merge_private_bfd_data): Likewise.
* elf32-s390.c (elf32_s390_merge_private_bfd_data): Likewise.
* elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
(elf32_score_merge_private_bfd_data): Likewise.
* elf32-score.h (s7_elf32_score_merge_private_bfd_data): Likewise.
* elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
* elf32-sh.c (sh_merge_bfd_arch, sh_elf_merge_private_data): Likewise.
* elf32-sh64.c (sh64_elf_merge_private_data): Likewise.
* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
* elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
(elf32_tic6x_merge_private_bfd_data): Likewise.
* elf32-v850.c (v850_elf_merge_private_bfd_data): Likewise.
* elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
* elf32-visium.c (visium_elf_merge_private_bfd_data): Likewise.
* elf32-xtensa.c (elf_xtensa_merge_private_bfd_data): Likewise.
* elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
* elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Likewise.
* elf64-s390.c (elf64_s390_merge_private_bfd_data): Likewise.
* elf64-sh64.c (sh_elf64_merge_private_data): Likewise.
* elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data): Likewise.
* elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
* elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
(mips_elf_merge_obj_attributes): Likewise.
(_bfd_mips_elf_merge_private_bfd_data): Likewise.
* elfxx-mips.h (_bfd_mips_elf_merge_private_bfd_data): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
* elfxx-sparc.h (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
* elfxx-target.h (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
* elfxx-tilegx.c (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
* elfxx-tilegx.h (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
* libbfd-in.h (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
ld/
* ldlang.c (lang_check): Update bfd_merge_private_bfd_data call.
+2016-10-07 Alan Modra <amodra@gmail.com>
+
+ * targets.c (bfd_target <_bfd_merge_private_bfd_data>): Replace
+ obfd param with struct bfd_link_info param. Update all callers.
+ * linker.c (bfd_merge_private_bfd_data): Likewise.
+ (_bfd_generic_verify_endian_match): Likewise.
+ * aoutf1.h (sunos_merge_private_bfd_data): Likewise.
+ * coff-arm.c (coff_arm_merge_private_bfd_data): Likewise.
+ * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
+ * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Likewise.
+ (_bfd_elf_merge_object_attributes): Likewise.
+ * elf-m10300.c (_bfd_mn10300_elf_merge_private_bfd_data): Likewise.
+ * elf-s390-common.c (elf_s390_merge_obj_attributes): Likewise.
+ * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
+ * elf32-arm.c (elf32_arm_merge_eabi_attributes): Likewise.
+ (elf32_arm_merge_private_bfd_data): Likewise.
+ * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
+ * elf32-cr16.c (_bfd_cr16_elf_merge_private_bfd_data): Likewise.
+ * elf32-cris.c (cris_elf_merge_private_bfd_data): Likewise.
+ * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
+ * elf32-h8300.c (elf32_h8_merge_private_bfd_data): Likewise.
+ * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
+ * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
+ * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
+ * elf32-m32r.c (m32r_elf_merge_private_bfd_data): Likewise.
+ * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
+ * elf32-m68hc1x.h (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
+ * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Likewise.
+ * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
+ * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
+ * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Likewise.
+ (elf32_msp430_merge_private_bfd_data): Likewise.
+ * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
+ * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
+ * elf32-nios2.c (nios2_elf32_merge_private_bfd_data): Likewise.
+ * elf32-or1k.c (elf32_or1k_merge_private_bfd_data): Likewise.
+ * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Likewise.
+ (ppc_elf_merge_obj_attributes): Likewise.
+ (ppc_elf_merge_private_bfd_data): Likewise.
+ * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Likewise.
+ * elf32-rx.c (rx_elf_merge_private_bfd_data): Likewise.
+ * elf32-s390.c (elf32_s390_merge_private_bfd_data): Likewise.
+ * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
+ (elf32_score_merge_private_bfd_data): Likewise.
+ * elf32-score.h (s7_elf32_score_merge_private_bfd_data): Likewise.
+ * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
+ * elf32-sh.c (sh_merge_bfd_arch, sh_elf_merge_private_data): Likewise.
+ * elf32-sh64.c (sh64_elf_merge_private_data): Likewise.
+ * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
+ * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
+ (elf32_tic6x_merge_private_bfd_data): Likewise.
+ * elf32-v850.c (v850_elf_merge_private_bfd_data): Likewise.
+ * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
+ * elf32-visium.c (visium_elf_merge_private_bfd_data): Likewise.
+ * elf32-xtensa.c (elf_xtensa_merge_private_bfd_data): Likewise.
+ * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
+ * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Likewise.
+ * elf64-s390.c (elf64_s390_merge_private_bfd_data): Likewise.
+ * elf64-sh64.c (sh_elf64_merge_private_data): Likewise.
+ * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
+ * elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data): Likewise.
+ * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
+ * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
+ (mips_elf_merge_obj_attributes): Likewise.
+ (_bfd_mips_elf_merge_private_bfd_data): Likewise.
+ * elfxx-mips.h (_bfd_mips_elf_merge_private_bfd_data): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
+ * elfxx-sparc.h (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
+ * elfxx-target.h (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
+ * elfxx-tilegx.c (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
+ * elfxx-tilegx.h (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
+ * libbfd-in.h (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
2016-10-07 Alan Modra <amodra@gmail.com>
* Makefile.am (LIBBFD_H_FILES): Update.
#define MY_bfd_merge_private_bfd_data sunos_merge_private_bfd_data
static bfd_boolean
-sunos_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+sunos_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
if (bfd_get_flavour (ibfd) != bfd_target_aout_flavour
|| bfd_get_flavour (obfd) != bfd_target_aout_flavour)
return TRUE;
bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
/* Called to merge BFD general private data from one object file
to a common output file when linking. */
- bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
+ bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
/* Called to initialize BFD private section data from one object file
to another. */
#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
bfd_boolean _bfd_generic_link_check_relocs
(bfd *abfd, struct bfd_link_info *info);
-bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
+bfd_boolean bfd_merge_private_bfd_data
+ (bfd *ibfd, struct bfd_link_info *info);
-#define bfd_merge_private_bfd_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
- (ibfd, obfd))
+#define bfd_merge_private_bfd_data(ibfd, info) \
+ BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
+ (ibfd, info))
/* Extracted from simple.c. */
bfd_byte *bfd_simple_get_relocated_section_contents
(bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
targets, eg different CPUs or different APCS's. */
static bfd_boolean
-coff_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
BFD_ASSERT (ibfd != NULL && obfd != NULL);
if (ibfd == obfd)
attributes. */
bfd_boolean
-_bfd_elf_merge_object_attributes (bfd *ibfd, bfd *obfd)
+_bfd_elf_merge_object_attributes (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
obj_attribute *in_attr;
obj_attribute *out_attr;
int vendor;
/* PowerPC elf_object_p tweak. */
extern bfd_boolean _bfd_elf_ppc_set_arch (bfd *);
/* PowerPC .gnu.attributes handling common to both 32-bit and 64-bit. */
-extern void _bfd_elf_ppc_merge_fp_attributes (bfd *, bfd *);
+extern void _bfd_elf_ppc_merge_fp_attributes (bfd *, struct bfd_link_info *);
/* Exported interface for writing elf corefile notes. */
extern char *elfcore_write_note
extern void _bfd_elf_copy_obj_attributes (bfd *, bfd *);
extern int _bfd_elf_obj_attrs_arg_type (bfd *, int, unsigned int);
extern void _bfd_elf_parse_attributes (bfd *, Elf_Internal_Shdr *);
-extern bfd_boolean _bfd_elf_merge_object_attributes (bfd *, bfd *);
+extern bfd_boolean _bfd_elf_merge_object_attributes
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_merge_unknown_attribute_low (bfd *, bfd *, int);
extern bfd_boolean _bfd_elf_merge_unknown_attribute_list (bfd *, bfd *);
extern Elf_Internal_Shdr *_bfd_elf_single_rel_hdr (asection *sec);
object file when linking. */
static bfd_boolean
-_bfd_mn10300_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_mn10300_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
+
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
return TRUE;
/* Merge object attributes from IBFD into OBFD. Raise an error if
there are conflicting attributes. */
static bfd_boolean
-elf_s390_merge_obj_attributes (bfd *ibfd, bfd *obfd)
+elf_s390_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
obj_attribute *in_attr, *in_attrs;
obj_attribute *out_attr, *out_attrs;
}
/* Merge Tag_compatibility attributes and any common GNU ones. */
- _bfd_elf_merge_object_attributes (ibfd, obfd);
+ _bfd_elf_merge_object_attributes (ibfd, info);
return TRUE;
}
object file when linking. */
static bfd_boolean
-arc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
unsigned short mach_ibfd;
static unsigned short mach_obfd = EM_NONE;
flagword out_flags;
asection *sec;
/* Check if we have the same endianess. */
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ if (! _bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
/* Collect ELF flags. */
are conflicting attributes. */
static bfd_boolean
-elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
+elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
obj_attribute *in_attr;
obj_attribute *out_attr;
/* Some tags have 0 = don't care, 1 = strong requirement,
}
/* Merge Tag_compatibility attributes and any common GNU ones. */
- if (!_bfd_elf_merge_object_attributes (ibfd, obfd))
+ if (!_bfd_elf_merge_object_attributes (ibfd, info))
return FALSE;
/* Check for any attributes not known on ARM. */
object file when linking. */
static bfd_boolean
-elf32_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd);
+elf32_arm_merge_private_bfd_data (bfd *, struct bfd_link_info *);
/* Display the flags field. */
object file when linking. */
static bfd_boolean
-elf32_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
bfd_boolean flags_compatible = TRUE;
asection *sec;
/* Check if we have the same endianness. */
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ if (! _bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
if (! is_arm_elf (ibfd) || ! is_arm_elf (obfd))
return TRUE;
- if (!elf32_arm_merge_eabi_attributes (ibfd, obfd))
+ if (!elf32_arm_merge_eabi_attributes (ibfd, info))
return FALSE;
/* The input BFD must have had its flags initialised. */
object file when linking. */
static bfd_boolean
-elf32_bfin_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_bfin_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags, new_flags;
bfd_boolean error = FALSE;
object file when linking. */
static bfd_boolean
-_bfd_cr16_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_cr16_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
+
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
return TRUE;
/* Don't mix files with and without a leading underscore. */
static bfd_boolean
-cris_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+cris_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
int imach, omach;
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ if (! _bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
object file when linking. */
static bfd_boolean
-frv_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags, old_partial;
flagword new_flags, new_partial;
bfd_boolean error = FALSE;
static unsigned long elf32_h8_mach (flagword);
static void elf32_h8_final_write_processing (bfd *, bfd_boolean);
static bfd_boolean elf32_h8_object_p (bfd *);
-static bfd_boolean elf32_h8_merge_private_bfd_data (bfd *, bfd *);
+static bfd_boolean elf32_h8_merge_private_bfd_data
+ (bfd *, struct bfd_link_info *);
static bfd_boolean elf32_h8_relax_section
(bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
static bfd_boolean elf32_h8_relax_delete_bytes
time is the architecture/machine information. */
static bfd_boolean
-elf32_h8_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_h8_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
+
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
return TRUE;
object file when linking. */
static bfd_boolean
-i370_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+i370_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags;
flagword new_flags;
file to the output object file when linking. */
static bfd_boolean
-iq2000_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+iq2000_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags, old_partial;
flagword new_flags, new_partial;
bfd_boolean error = FALSE;
object file when linking. */
static bfd_boolean
-m32c_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+m32c_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags, old_partial;
flagword new_flags, new_partial;
bfd_boolean error = FALSE;
object file when linking. */
static bfd_boolean
-m32r_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+m32r_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
object file when linking. */
bfd_boolean
-_bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags;
flagword new_flags;
bfd_boolean ok = TRUE;
/* Check if we have the same endianness */
- if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+ if (!_bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
#define BFD_M68HC11_BANK_VIRTUAL_NAME "__bank_virtual"
/* Set and control ELF flags in ELF header. */
-extern bfd_boolean _bfd_m68hc11_elf_merge_private_bfd_data (bfd*,bfd*);
+extern bfd_boolean _bfd_m68hc11_elf_merge_private_bfd_data
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_m68hc11_elf_set_private_flags (bfd*,flagword);
extern bfd_boolean _bfd_m68hc11_elf_print_private_bfd_data (bfd*, void*);
/* Merge backend specific data from an object file to the output
object file when linking. */
static bfd_boolean
-elf32_m68k_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_m68k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
flagword out_isa;
object file when linking. */
static bfd_boolean
-mcore_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+mcore_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags;
flagword new_flags;
/* Check if we have the same endianness. */
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ if (! _bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
object file when linking. */
static bfd_boolean
-mep_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+mep_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
static bfd *last_ibfd = 0;
flagword old_flags, new_flags;
flagword old_partial, new_partial;
/* Check if we have the same endianness. */
- if (_bfd_generic_verify_endian_match (ibfd, obfd) == FALSE)
+ if (!_bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
new_flags = elf_elfheader (ibfd)->e_flags;
Raise an error if there are conflicting attributes. */
static bfd_boolean
-elf32_msp430_merge_mspabi_attributes (bfd *ibfd, bfd *obfd)
+elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
obj_attribute *in_attr;
obj_attribute *out_attr;
bfd_boolean result = TRUE;
object file when linking. */
static bfd_boolean
-elf32_msp430_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+elf32_msp430_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
/* Make sure that the machine number reflects the most
advanced version of the MSP architecture required. */
#define max(a,b) ((a) > (b) ? (a) : (b))
max (bfd_get_mach (ibfd), bfd_get_mach (obfd)));
#undef max
- return elf32_msp430_merge_mspabi_attributes (ibfd, obfd);
+ return elf32_msp430_merge_mspabi_attributes (ibfd, info);
}
static bfd_boolean
object file when linking. */
static bfd_boolean
-mt_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+mt_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags, new_flags;
bfd_boolean ok = TRUE;
/* Check if we have the same endianness. */
- if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+ if (!_bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
/* If they're not both mt, then merging is meaningless, so just
static bfd_boolean nds32_elf_object_p (bfd *);
static void nds32_elf_final_write_processing (bfd *, bfd_boolean);
static bfd_boolean nds32_elf_set_private_flags (bfd *, flagword);
-static bfd_boolean nds32_elf_merge_private_bfd_data (bfd *, bfd *);
+static bfd_boolean nds32_elf_merge_private_bfd_data
+ (bfd *, struct bfd_link_info *);
static bfd_boolean nds32_elf_print_private_bfd_data (bfd *, void *);
static bfd_boolean nds32_elf_gc_sweep_hook
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
object file when linking. */
static bfd_boolean
-nds32_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
flagword out_16regs;
object file when linking. */
static bfd_boolean
-nios2_elf32_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+nios2_elf32_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags;
flagword new_flags;
return TRUE;
/* Check if we have the same endianness. */
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ if (! _bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
new_flags = elf_elfheader (ibfd)->e_flags;
}
/* Merge Tag_compatibility attributes and any common GNU ones. */
- _bfd_elf_merge_object_attributes (ibfd, obfd);
+ _bfd_elf_merge_object_attributes (ibfd, info);
return TRUE;
}
EF_OR1K_NODELAY flag setting. */
static bfd_boolean
-elf32_or1k_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_or1k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
/* Warn for conflicting Tag_GNU_Power_ABI_FP attributes between IBFD
and OBFD, and merge non-conflicting ones. */
void
-_bfd_elf_ppc_merge_fp_attributes (bfd *ibfd, bfd *obfd)
+_bfd_elf_ppc_merge_fp_attributes (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
obj_attribute *in_attr, *in_attrs;
obj_attribute *out_attr, *out_attrs;
/* Merge object attributes from IBFD into OBFD. Warn if
there are conflicting attributes. */
static bfd_boolean
-ppc_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
+ppc_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd;
obj_attribute *in_attr, *in_attrs;
obj_attribute *out_attr, *out_attrs;
- _bfd_elf_ppc_merge_fp_attributes (ibfd, obfd);
+ _bfd_elf_ppc_merge_fp_attributes (ibfd, info);
+ obfd = info->output_bfd;
in_attrs = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU];
out_attrs = elf_known_obj_attributes (obfd)[OBJ_ATTR_GNU];
}
/* Merge Tag_compatibility attributes and any common GNU ones. */
- _bfd_elf_merge_object_attributes (ibfd, obfd);
+ _bfd_elf_merge_object_attributes (ibfd, info);
return TRUE;
}
object file when linking. */
static bfd_boolean
-ppc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+ppc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags;
flagword new_flags;
bfd_boolean error;
return TRUE;
/* Check if we have the same endianness. */
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ if (! _bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
- if (!ppc_elf_merge_obj_attributes (ibfd, obfd))
+ if (!ppc_elf_merge_obj_attributes (ibfd, info))
return FALSE;
new_flags = elf_elfheader (ibfd)->e_flags;
object file when linking. */
static bfd_boolean
-rl78_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+rl78_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword new_flags;
flagword old_flags;
bfd_boolean error = FALSE;
object file when linking. */
static bfd_boolean
-rx_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+rx_elf_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags;
flagword new_flags;
bfd_boolean error = FALSE;
object file when linking. */
static bfd_boolean
-elf32_s390_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_s390_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
+
if (!is_s390_elf (ibfd) || !is_s390_elf (obfd))
return TRUE;
- if (!elf_s390_merge_obj_attributes (ibfd, obfd))
+ if (!elf_s390_merge_obj_attributes (ibfd, info))
return FALSE;
elf_elfheader (obfd)->e_flags |= elf_elfheader (ibfd)->e_flags;
}
static bfd_boolean
-s3_elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+s3_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword in_flags;
flagword out_flags;
- if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+ if (!_bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
in_flags = elf_elfheader (ibfd)->e_flags;
}
static bfd_boolean
-elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
- if (bfd_get_mach (obfd) == bfd_mach_score3)
- return s3_elf32_score_merge_private_bfd_data (ibfd, obfd);
+ if (bfd_get_mach (info->output_bfd) == bfd_mach_score3)
+ return s3_elf32_score_merge_private_bfd_data (ibfd, info);
else
- return s7_elf32_score_merge_private_bfd_data (ibfd, obfd);
+ return s7_elf32_score_merge_private_bfd_data (ibfd, info);
}
static bfd_boolean
s7_elf32_score_print_private_bfd_data (bfd *, void *);
extern bfd_boolean
-s7_elf32_score_merge_private_bfd_data (bfd *, bfd *);
+s7_elf32_score_merge_private_bfd_data (bfd *, struct bfd_link_info *);
extern bfd_boolean
s7_elf32_score_new_section_hook (bfd *, asection *);
}
bfd_boolean
-s7_elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+s7_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword in_flags;
flagword out_flags;
- if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+ if (!_bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
in_flags = elf_elfheader (ibfd)->e_flags;
that fits the requirements then an error is emitted. */
static bfd_boolean
-sh_merge_bfd_arch (bfd *ibfd, bfd *obfd)
+sh_merge_bfd_arch (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
unsigned int old_arch, new_arch, merged_arch;
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ if (! _bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
old_arch = sh_get_arch_up_from_bfd_mach (bfd_get_mach (obfd));
calls sh_merge_bfd_arch() to check dsp/fpu compatibility. */
static bfd_boolean
-sh_elf_merge_private_data (bfd *ibfd, bfd *obfd)
+sh_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
{
- extern bfd_boolean sh_merge_bfd_arch (bfd *, bfd *);
+ bfd *obfd = info->output_bfd;
if (! is_sh_elf (ibfd) || ! is_sh_elf (obfd))
return TRUE;
elf_elfheader (obfd)->e_flags &= ~EF_SH_PIC;
}
- if (! sh_merge_bfd_arch (ibfd, obfd))
+ if (! sh_merge_bfd_arch (ibfd, info))
{
_bfd_error_handler ("%B: uses instructions which are incompatible "
"with instructions used in previous modules",
static bfd_boolean sh64_elf_copy_private_data
(bfd *, bfd *);
static bfd_boolean sh64_elf_merge_private_data
- (bfd *, bfd *);
+ (bfd *, struct bfd_link_info *);
static bfd_boolean sh64_elf_fake_sections
(bfd *, Elf_Internal_Shdr *, asection *);
static bfd_boolean sh64_elf_set_private_flags
}
static bfd_boolean
-sh64_elf_merge_private_data (bfd *ibfd, bfd *obfd)
+sh64_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags, new_flags;
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ if (! _bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
object file when linking. */
static bfd_boolean
-elf32_sparc_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
bfd_boolean error;
unsigned long ibfd_mach;
/* FIXME: This should not be static. */
return FALSE;
}
- return _bfd_sparc_elf_merge_private_bfd_data (ibfd, obfd);
+ return _bfd_sparc_elf_merge_private_bfd_data (ibfd, info);
}
/* The final processing done just before writing out the object file.
succeeded, FALSE otherwise. */
static bfd_boolean
-elf32_tic6x_merge_attributes (bfd *ibfd, bfd *obfd)
+elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
bfd_boolean result = TRUE;
obj_attribute *in_attr;
obj_attribute *out_attr;
}
/* Merge Tag_ABI_compatibility attributes and any common GNU ones. */
- if (!_bfd_elf_merge_object_attributes (ibfd, obfd))
+ if (!_bfd_elf_merge_object_attributes (ibfd, info))
return FALSE;
result &= _bfd_elf_merge_unknown_attribute_list (ibfd, obfd);
}
static bfd_boolean
-elf32_tic6x_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_tic6x_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
- if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+ if (!_bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
- if (! is_tic6x_elf (ibfd) || ! is_tic6x_elf (obfd))
+ if (! is_tic6x_elf (ibfd) || ! is_tic6x_elf (info->output_bfd))
return TRUE;
- if (!elf32_tic6x_merge_attributes (ibfd, obfd))
+ if (!elf32_tic6x_merge_attributes (ibfd, info))
return FALSE;
return TRUE;
to the output object file when linking. */
static bfd_boolean
-v850_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+v850_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
bfd_boolean result = TRUE;
const arelent *);
static bfd_boolean elf32_vax_set_private_flags (bfd *, flagword);
-static bfd_boolean elf32_vax_merge_private_bfd_data (bfd *, bfd *);
static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, void *);
static reloc_howto_type howto_table[] = {
/* Merge backend specific data from an object file to the output
object file when linking. */
static bfd_boolean
-elf32_vax_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_vax_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword in_flags;
if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
file to the output object file when linking. */
static bfd_boolean
-visium_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+visium_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags;
flagword new_flags;
flagword mismatch;
object file when linking. */
static bfd_boolean
-elf_xtensa_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf_xtensa_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
unsigned out_mach, in_mach;
flagword out_flag, in_flag;
/* Check if we have the same endianness. */
- if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+ if (!_bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
/* Don't even pretend to support mixed-format linking. */
/* Merge backend specific data from an object file to the output
object file when linking. */
static bfd_boolean
-elf64_ia64_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
bfd_boolean ok = TRUE;
object file when linking. */
static bfd_boolean
-ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+ppc64_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
unsigned long iflags, oflags;
if ((ibfd->flags & BFD_LINKER_CREATED) != 0)
if (!is_ppc64_elf (ibfd) || !is_ppc64_elf (obfd))
return TRUE;
- if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+ if (!_bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
iflags = elf_elfheader (ibfd)->e_flags;
return FALSE;
}
- _bfd_elf_ppc_merge_fp_attributes (ibfd, obfd);
+ _bfd_elf_ppc_merge_fp_attributes (ibfd, info);
/* Merge Tag_compatibility attributes and any common GNU ones. */
- _bfd_elf_merge_object_attributes (ibfd, obfd);
+ _bfd_elf_merge_object_attributes (ibfd, info);
return TRUE;
}
object file when linking. */
static bfd_boolean
-elf64_s390_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf64_s390_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
- if (!is_s390_elf (ibfd) || !is_s390_elf (obfd))
+ if (!is_s390_elf (ibfd) || !is_s390_elf (info->output_bfd))
return TRUE;
- if (!elf_s390_merge_obj_attributes (ibfd, obfd))
- return FALSE;
-
- return TRUE;
+ return elf_s390_merge_obj_attributes (ibfd, info);
}
/* Why was the hash table entry size definition changed from
}
static bfd_boolean
-sh_elf64_merge_private_data (bfd *ibfd, bfd *obfd)
+sh_elf64_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword old_flags, new_flags;
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ if (! _bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
object file when linking. */
static bfd_boolean
-elf64_sparc_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf64_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
bfd_boolean error;
flagword new_flags, old_flags;
int new_mm, old_mm;
return FALSE;
}
}
- return _bfd_sparc_elf_merge_private_bfd_data (ibfd, obfd);
+ return _bfd_sparc_elf_merge_private_bfd_data (ibfd, info);
}
/* MARCO: Set the correct entry size for the .stab section. */
object file when linking. */
static bfd_boolean
-elfNN_aarch64_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elfNN_aarch64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
bfd_boolean flags_compatible = TRUE;
asection *sec;
/* Check if we have the same endianess. */
- if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+ if (!_bfd_generic_verify_endian_match (ibfd, info))
return FALSE;
if (!is_aarch64_elf (ibfd) || !is_aarch64_elf (obfd))
/* Merge backend specific data from an object file to the output
object file when linking. */
static bfd_boolean
-elfNN_ia64_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
bfd_boolean ok = TRUE;
if there are conflicting settings. */
static bfd_boolean
-mips_elf_merge_obj_e_flags (bfd *ibfd, bfd *obfd)
+mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
struct mips_elf_obj_tdata *out_tdata = mips_elf_tdata (obfd);
flagword old_flags;
flagword new_flags;
/* Merge object attributes from IBFD into OBFD. Raise an error if
there are conflicting attributes. */
static bfd_boolean
-mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
+mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
obj_attribute *in_attr;
obj_attribute *out_attr;
bfd *abi_fp_bfd;
}
/* Merge Tag_compatibility attributes and any common GNU ones. */
- return _bfd_elf_merge_object_attributes (ibfd, obfd);
+ return _bfd_elf_merge_object_attributes (ibfd, info);
}
/* Merge object ABI flags from IBFD into OBFD. Raise an error if
object file when linking. */
bfd_boolean
-_bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
struct mips_elf_obj_tdata *out_tdata;
struct mips_elf_obj_tdata *in_tdata;
bfd_boolean null_input_bfd = TRUE;
bfd_boolean ok;
/* Check if we have the same endianness. */
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ if (! _bfd_generic_verify_endian_match (ibfd, info))
{
_bfd_error_handler
(_("%B: endianness incompatible with that of the selected emulation"),
ok = TRUE;
}
else
- ok = mips_elf_merge_obj_e_flags (ibfd, obfd);
+ ok = mips_elf_merge_obj_e_flags (ibfd, info);
- ok = mips_elf_merge_obj_attributes (ibfd, obfd) && ok;
+ ok = mips_elf_merge_obj_attributes (ibfd, info) && ok;
ok = mips_elf_merge_obj_abiflags (ibfd, obfd) && ok;
extern bfd_boolean _bfd_mips_elf_final_link
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mips_elf_merge_private_bfd_data
- (bfd *, bfd *);
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mips_elf_set_private_flags
(bfd *, flagword);
extern const char * _bfd_mips_fp_abi_string
object file when linking. */
bfd_boolean
-_bfd_sparc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_sparc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
obj_attribute *in_attr, *in_attrs;
obj_attribute *out_attr, *out_attrs;
out_attr->i |= in_attr->i;
out_attr->type = 1;
-
/* Merge Tag_compatibility attributes and any common GNU ones. */
- _bfd_elf_merge_object_attributes (ibfd, obfd);
+ _bfd_elf_merge_object_attributes (ibfd, info);
return TRUE;
}
extern bfd_vma _bfd_sparc_elf_plt_sym_val
(bfd_vma, const asection *, const arelent *);
extern bfd_boolean _bfd_sparc_elf_merge_private_bfd_data
- (bfd *, bfd *);
+ (bfd *, struct bfd_link_info *);
#endif
#ifndef bfd_elfNN_bfd_merge_private_bfd_data
#define bfd_elfNN_bfd_merge_private_bfd_data \
- ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
+ ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_true)
#endif
#ifndef bfd_elfNN_bfd_set_private_flags
#define bfd_elfNN_bfd_set_private_flags \
bfd_boolean
-_bfd_tilegx_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_tilegx_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
const char *targ1 = bfd_get_target (ibfd);
const char *targ2 = bfd_get_target (obfd);
tilegx_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *);
extern bfd_boolean
-_bfd_tilegx_elf_merge_private_bfd_data (bfd *, bfd *);
+_bfd_tilegx_elf_merge_private_bfd_data (bfd *, struct bfd_link_info *);
#define _bfd_generic_bfd_copy_private_bfd_data \
((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
#define _bfd_generic_bfd_merge_private_bfd_data \
- ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
+ ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_true)
#define _bfd_generic_bfd_set_private_flags \
((bfd_boolean (*) (bfd *, flagword)) bfd_true)
#define _bfd_generic_bfd_copy_private_section_data \
#define _bfd_generic_bfd_copy_private_bfd_data \
((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
#define _bfd_generic_bfd_merge_private_bfd_data \
- ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
+ ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_true)
#define _bfd_generic_bfd_set_private_flags \
((bfd_boolean (*) (bfd *, flagword)) bfd_true)
#define _bfd_generic_bfd_copy_private_section_data \
/* Extracted from linker.c. */
bfd_boolean _bfd_generic_verify_endian_match
- (bfd *ibfd, bfd *obfd);
+ (bfd *ibfd, struct bfd_link_info *info);
#ifdef __cplusplus
}
bfd_merge_private_bfd_data
SYNOPSIS
- bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
+ bfd_boolean bfd_merge_private_bfd_data
+ (bfd *ibfd, struct bfd_link_info *info);
DESCRIPTION
Merge private BFD information from the BFD @var{ibfd} to the
- the output file BFD @var{obfd} when linking. Return <<TRUE>> on success,
+ the output file BFD when linking. Return <<TRUE>> on success,
<<FALSE>> on error. Possible error returns are:
o <<bfd_error_no_memory>> -
Not enough memory exists to create private data for @var{obfd}.
-.#define bfd_merge_private_bfd_data(ibfd, obfd) \
-. BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
-. (ibfd, obfd))
-
+.#define bfd_merge_private_bfd_data(ibfd, info) \
+. BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
+. (ibfd, info))
*/
/*
SYNOPSIS
bfd_boolean _bfd_generic_verify_endian_match
- (bfd *ibfd, bfd *obfd);
+ (bfd *ibfd, struct bfd_link_info *info);
DESCRIPTION
Can be used from / for bfd_merge_private_bfd_data to check that
*/
bfd_boolean
-_bfd_generic_verify_endian_match (bfd *ibfd, bfd *obfd)
+_bfd_generic_verify_endian_match (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
+
if (ibfd->xvec->byteorder != obfd->xvec->byteorder
&& ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
&& obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
. bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
. {* Called to merge BFD general private data from one object file
. to a common output file when linking. *}
-. bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
+. bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
. {* Called to initialize BFD private section data from one object file
. to another. *}
.#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
information which is needed in the output file. */
if (!command_line.warn_mismatch)
pfn = bfd_set_error_handler (ignore_bfd_errors);
- if (!bfd_merge_private_bfd_data (input_bfd, link_info.output_bfd))
+ if (!bfd_merge_private_bfd_data (input_bfd, &link_info))
{
if (command_line.warn_mismatch)
einfo (_("%P%X: failed to merge target specific data"