aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-09-30 08:44:50 +0930
committerAlan Modra <amodra@gmail.com>2016-10-07 11:24:41 +1030
commit50e03d47b77d5730f96f6b6bb66187654e66c797 (patch)
tree254912fdb3cba2c9c0d6e9d10bf12162cc215202 /bfd
parent1047201fd0f402428bb3331638a198413f97f476 (diff)
downloadgdb-50e03d47b77d5730f96f6b6bb66187654e66c797.zip
gdb-50e03d47b77d5730f96f6b6bb66187654e66c797.tar.gz
gdb-50e03d47b77d5730f96f6b6bb66187654e66c797.tar.bz2
Pass link_info to _bfd_merge_private_bfd_data
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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog75
-rw-r--r--bfd/aoutf1.h3
-rw-r--r--bfd/bfd-in2.h11
-rw-r--r--bfd/coff-arm.c3
-rw-r--r--bfd/elf-attrs.c3
-rw-r--r--bfd/elf-bfd.h5
-rw-r--r--bfd/elf-m10300.c4
-rw-r--r--bfd/elf-s390-common.c5
-rw-r--r--bfd/elf32-arc.c5
-rw-r--r--bfd/elf32-arm.c14
-rw-r--r--bfd/elf32-bfin.c3
-rw-r--r--bfd/elf32-cr16.c4
-rw-r--r--bfd/elf32-cris.c5
-rw-r--r--bfd/elf32-frv.c3
-rw-r--r--bfd/elf32-h8300.c7
-rw-r--r--bfd/elf32-i370.c3
-rw-r--r--bfd/elf32-iq2000.c3
-rw-r--r--bfd/elf32-m32c.c3
-rw-r--r--bfd/elf32-m32r.c3
-rw-r--r--bfd/elf32-m68hc1x.c5
-rw-r--r--bfd/elf32-m68hc1x.h3
-rw-r--r--bfd/elf32-m68k.c3
-rw-r--r--bfd/elf32-mcore.c5
-rw-r--r--bfd/elf32-mep.c5
-rw-r--r--bfd/elf32-msp430.c8
-rw-r--r--bfd/elf32-mt.c5
-rw-r--r--bfd/elf32-nds32.c6
-rw-r--r--bfd/elf32-nios2.c7
-rw-r--r--bfd/elf32-or1k.c3
-rw-r--r--bfd/elf32-ppc.c18
-rw-r--r--bfd/elf32-rl78.c3
-rw-r--r--bfd/elf32-rx.c3
-rw-r--r--bfd/elf32-s390.c6
-rw-r--r--bfd/elf32-score.c13
-rw-r--r--bfd/elf32-score.h2
-rw-r--r--bfd/elf32-score7.c5
-rw-r--r--bfd/elf32-sh.c11
-rw-r--r--bfd/elf32-sh64.c7
-rw-r--r--bfd/elf32-sparc.c5
-rw-r--r--bfd/elf32-tic6x.c13
-rw-r--r--bfd/elf32-v850.c3
-rw-r--r--bfd/elf32-vax.c4
-rw-r--r--bfd/elf32-visium.c3
-rw-r--r--bfd/elf32-xtensa.c5
-rw-r--r--bfd/elf64-ia64-vms.c3
-rw-r--r--bfd/elf64-ppc.c9
-rw-r--r--bfd/elf64-s390.c9
-rw-r--r--bfd/elf64-sh64.c5
-rw-r--r--bfd/elf64-sparc.c5
-rw-r--r--bfd/elfnn-aarch64.c5
-rw-r--r--bfd/elfnn-ia64.c3
-rw-r--r--bfd/elfxx-mips.c17
-rw-r--r--bfd/elfxx-mips.h2
-rw-r--r--bfd/elfxx-sparc.c6
-rw-r--r--bfd/elfxx-sparc.h2
-rw-r--r--bfd/elfxx-target.h2
-rw-r--r--bfd/elfxx-tilegx.c3
-rw-r--r--bfd/elfxx-tilegx.h2
-rw-r--r--bfd/libbfd-in.h2
-rw-r--r--bfd/libbfd.h4
-rw-r--r--bfd/linker.c18
-rw-r--r--bfd/targets.c2
62 files changed, 274 insertions, 138 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d500e3f..9a4e71e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,80 @@
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.
* doc/Makefile.am (LIBBFD_H_DEP): Likewise.
* cpu-sh.c (sh_merge_bfd_arch): Move to..
diff --git a/bfd/aoutf1.h b/bfd/aoutf1.h
index 86fb25d..d3a0e1d 100644
--- a/bfd/aoutf1.h
+++ b/bfd/aoutf1.h
@@ -75,8 +75,9 @@
#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;
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 35302ea..31b9584 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -7291,7 +7291,7 @@ typedef struct bfd_target
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) \
@@ -7615,11 +7615,12 @@ bfd_boolean bfd_link_check_relocs
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);
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index b344d98..713f65b 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -2168,8 +2168,9 @@ coff_arm_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED,
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)
diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c
index 8819f8e..50983c6 100644
--- a/bfd/elf-attrs.c
+++ b/bfd/elf-attrs.c
@@ -571,8 +571,9 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr)
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;
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 7f78b1d..af2af2c 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2392,7 +2392,7 @@ extern unsigned int _bfd_elf_ppc_at_tprel_transform
/* 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
@@ -2508,7 +2508,8 @@ extern char *_bfd_elf_attr_strdup (bfd *, const char *);
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);
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index 25f1668..bb8132a 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -4725,8 +4725,10 @@ _bfd_mn10300_elf_object_p (bfd *abfd)
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;
diff --git a/bfd/elf-s390-common.c b/bfd/elf-s390-common.c
index 2170da0..61241dc 100644
--- a/bfd/elf-s390-common.c
+++ b/bfd/elf-s390-common.c
@@ -259,8 +259,9 @@ elf_s390_elf_sort_relocs_p (asection *sec)
/* 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;
@@ -309,7 +310,7 @@ elf_s390_merge_obj_attributes (bfd *ibfd, bfd *obfd)
}
/* 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;
}
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 002674b..68f714a 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -542,8 +542,9 @@ arc_info_to_howto_rel (bfd * abfd ATTRIBUTE_UNUSED,
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;
@@ -551,7 +552,7 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
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. */
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 8dcc6d8..787e570 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -13492,8 +13492,9 @@ elf32_arm_attributes_forbid_div (const obj_attribute *attr)
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,
@@ -14048,7 +14049,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
}
/* 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. */
@@ -14076,7 +14077,7 @@ elf32_arm_versions_compatible (unsigned iver, unsigned over)
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. */
@@ -19595,21 +19596,22 @@ elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
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. */
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index 0a00803..eb06e14 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -4967,8 +4967,9 @@ elf32_bfin_print_private_bfd_data (bfd * abfd, void * ptr)
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;
diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c
index 3ef3ebc..db1022f 100644
--- a/bfd/elf32-cr16.c
+++ b/bfd/elf32-cr16.c
@@ -1725,8 +1725,10 @@ _bfd_cr16_elf_object_p (bfd *abfd)
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;
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 255a9fd..92668fb 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -4154,11 +4154,12 @@ cris_elf_print_private_bfd_data (bfd *abfd, void * ptr)
/* 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
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 80f6959..82a1330 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -6349,8 +6349,9 @@ frv_elf_arch_extension_p (flagword base, flagword extension)
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;
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index 5368385..420dc8c 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -33,7 +33,8 @@ static void elf32_h8_info_to_howto_rel
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
@@ -640,8 +641,10 @@ elf32_h8_object_p (bfd *abfd)
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;
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index ab68551..3130f96 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -330,8 +330,9 @@ i370_elf_set_private_flags (bfd *abfd, flagword flags)
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;
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
index 0f7a75d..e2db9a7 100644
--- a/bfd/elf32-iq2000.c
+++ b/bfd/elf32-iq2000.c
@@ -768,8 +768,9 @@ iq2000_elf_set_private_flags (bfd *abfd, flagword 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;
diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c
index dbfd85c..c2962e5 100644
--- a/bfd/elf32-m32c.c
+++ b/bfd/elf32-m32c.c
@@ -817,8 +817,9 @@ m32c_elf_set_private_flags (bfd *abfd, flagword flags)
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;
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index f5d9495..20dfab5 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -3483,8 +3483,9 @@ m32r_elf_set_private_flags (bfd *abfd, flagword flags)
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;
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 600ba54..ca7c49e 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -1308,14 +1308,15 @@ _bfd_m68hc11_elf_set_private_flags (bfd *abfd, flagword 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
diff --git a/bfd/elf32-m68hc1x.h b/bfd/elf32-m68hc1x.h
index 33e2b47..f090af1 100644
--- a/bfd/elf32-m68hc1x.h
+++ b/bfd/elf32-m68hc1x.h
@@ -33,7 +33,8 @@
#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*);
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 8e37185..0d05da0 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -1117,8 +1117,9 @@ elf32_m68k_set_private_flags (bfd *abfd, flagword flags)
/* 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;
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index 7b04e7a..bcefc80 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -49,13 +49,14 @@ mcore_elf_set_private_flags (bfd * abfd, flagword flags)
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
diff --git a/bfd/elf32-mep.c b/bfd/elf32-mep.c
index 630d0e3..e9d1259 100644
--- a/bfd/elf32-mep.c
+++ b/bfd/elf32-mep.c
@@ -568,14 +568,15 @@ mep_elf_set_private_flags (bfd * abfd,
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;
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index 94052fa..d218528 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -2406,8 +2406,9 @@ data_model (int model)
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;
@@ -2509,8 +2510,9 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, bfd *obfd)
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))
@@ -2519,7 +2521,7 @@ elf32_msp430_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
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
diff --git a/bfd/elf32-mt.c b/bfd/elf32-mt.c
index 9f7d3fc..02f1f88 100644
--- a/bfd/elf32-mt.c
+++ b/bfd/elf32-mt.c
@@ -502,13 +502,14 @@ mt_elf_set_private_flags (bfd * abfd,
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
diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c
index ac09e87..81195a4 100644
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
@@ -77,7 +77,8 @@ static bfd_boolean nds32_elf_relocate_section
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 *);
@@ -5988,8 +5989,9 @@ nds32_check_vec_size (bfd *ibfd)
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;
diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
index f56460a..f8ae3dd 100644
--- a/bfd/elf32-nios2.c
+++ b/bfd/elf32-nios2.c
@@ -2916,8 +2916,9 @@ nios2_elf32_build_stubs (struct bfd_link_info *info)
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;
@@ -2925,7 +2926,7 @@ nios2_elf32_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
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;
@@ -2968,7 +2969,7 @@ nios2_elf32_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
}
/* 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;
}
diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c
index 19491c0..e9cd232 100644
--- a/bfd/elf32-or1k.c
+++ b/bfd/elf32-or1k.c
@@ -2765,8 +2765,9 @@ or1k_elf_set_private_flags (bfd *abfd, flagword flags)
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;
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 627bff5..5f69374 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -4656,8 +4656,9 @@ ppc_elf_check_relocs (bfd *abfd,
/* 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;
@@ -4725,13 +4726,15 @@ _bfd_elf_ppc_merge_fp_attributes (bfd *ibfd, bfd *obfd)
/* 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];
@@ -4800,7 +4803,7 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
}
/* 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;
}
@@ -4809,8 +4812,9 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
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;
@@ -4819,10 +4823,10 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
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;
diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c
index 6cfed33..f58fa4e 100644
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -1156,8 +1156,9 @@ rl78_cpu_name (flagword 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;
diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c
index 7d5dc73..725cc28 100644
--- a/bfd/elf32-rx.c
+++ b/bfd/elf32-rx.c
@@ -3083,8 +3083,9 @@ describe_flags (flagword flags)
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;
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 7285ad6..d3f8746 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -4171,12 +4171,14 @@ elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
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;
diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c
index 9f84c4e..dc4e38d 100644
--- a/bfd/elf32-score.c
+++ b/bfd/elf32-score.c
@@ -4018,12 +4018,13 @@ s3_elf32_score_print_private_bfd_data (bfd *abfd, void * ptr)
}
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;
@@ -4392,12 +4393,12 @@ elf32_score_print_private_bfd_data (bfd *abfd, void * ptr)
}
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
diff --git a/bfd/elf32-score.h b/bfd/elf32-score.h
index b32224e..d7c2922 100644
--- a/bfd/elf32-score.h
+++ b/bfd/elf32-score.h
@@ -141,7 +141,7 @@ extern 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 *);
diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c
index 3aad1c7..7f38e8b 100644
--- a/bfd/elf32-score7.c
+++ b/bfd/elf32-score7.c
@@ -3824,12 +3824,13 @@ s7_elf32_score_print_private_bfd_data (bfd *abfd, void * ptr)
}
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;
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 6a027c3..753a736 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -6422,11 +6422,12 @@ sh_find_elf_flags (unsigned int arch_set)
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));
@@ -6466,9 +6467,9 @@ sh_merge_bfd_arch (bfd *ibfd, bfd *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;
@@ -6483,7 +6484,7 @@ sh_elf_merge_private_data (bfd *ibfd, bfd *obfd)
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",
diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c
index 89a51cc..bf865e1 100644
--- a/bfd/elf32-sh64.c
+++ b/bfd/elf32-sh64.c
@@ -44,7 +44,7 @@ static bfd_boolean sh64_elf_new_section_hook
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
@@ -203,11 +203,12 @@ sh64_elf_copy_private_data (bfd * ibfd, bfd * obfd)
}
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
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index cbe20b5..d93c93e 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -67,8 +67,9 @@ elf32_sparc_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
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. */
@@ -109,7 +110,7 @@ elf32_sparc_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
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.
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
index d2dddbf..a51254a 100644
--- a/bfd/elf32-tic6x.c
+++ b/bfd/elf32-tic6x.c
@@ -3730,8 +3730,9 @@ elf32_tic6x_array_alignment_to_tag (int align)
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;
@@ -3916,7 +3917,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd, bfd *obfd)
}
/* 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);
@@ -3925,15 +3926,15 @@ elf32_tic6x_merge_attributes (bfd *ibfd, bfd *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;
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 8c12186..d08e552 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -2760,8 +2760,9 @@ v850_elf_set_private_flags (bfd *abfd, flagword flags)
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;
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index a1cd1a1..d406c5d 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -50,7 +50,6 @@ static bfd_vma elf_vax_plt_sym_val (bfd_vma, const asection *,
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[] = {
@@ -499,8 +498,9 @@ elf32_vax_set_private_flags (bfd *abfd, flagword flags)
/* 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
diff --git a/bfd/elf32-visium.c b/bfd/elf32-visium.c
index db854a0..a042911 100644
--- a/bfd/elf32-visium.c
+++ b/bfd/elf32-visium.c
@@ -763,8 +763,9 @@ visium_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
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;
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index a27f43e..2940770 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -3457,13 +3457,14 @@ elf_xtensa_finish_dynamic_sections (bfd *output_bfd,
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. */
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c
index a64e8db..4fce7df 100644
--- a/bfd/elf64-ia64-vms.c
+++ b/bfd/elf64-ia64-vms.c
@@ -4202,8 +4202,9 @@ elf64_ia64_set_private_flags (bfd *abfd, flagword flags)
/* 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;
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 3264ecf..507f316 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -5999,8 +5999,9 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
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)
@@ -6009,7 +6010,7 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
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;
@@ -6031,10 +6032,10 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
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;
}
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index f9057e3..d422ff3 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -3973,15 +3973,12 @@ elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
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
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index ac82af2..58976d6 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -2271,11 +2271,12 @@ sh_elf64_copy_private_data (bfd *ibfd, bfd *obfd)
}
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
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 263fef7..d9d146f 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -636,8 +636,9 @@ elf64_sparc_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, asymbol *asym)
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;
@@ -715,7 +716,7 @@ elf64_sparc_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
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. */
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 56b0943..b329273 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -6522,15 +6522,16 @@ elfNN_aarch64_set_private_flags (bfd *abfd, flagword flags)
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))
diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c
index a9a01fe..be2cd84 100644
--- a/bfd/elfnn-ia64.c
+++ b/bfd/elfnn-ia64.c
@@ -4702,8 +4702,9 @@ elfNN_ia64_set_private_flags (bfd *abfd, flagword flags)
/* 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;
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 65f1ee4..d618e54 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -15063,8 +15063,9 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
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;
@@ -15255,8 +15256,9 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, bfd *obfd)
/* 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;
@@ -15398,7 +15400,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
}
/* 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
@@ -15437,8 +15439,9 @@ mips_elf_merge_obj_abiflags (bfd *ibfd, bfd *obfd)
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;
@@ -15446,7 +15449,7 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
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"),
@@ -15575,9 +15578,9 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
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;
diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h
index edbbd9f..8ea7b0f 100644
--- a/bfd/elfxx-mips.h
+++ b/bfd/elfxx-mips.h
@@ -107,7 +107,7 @@ extern struct bfd_link_hash_table *_bfd_mips_vxworks_link_hash_table_create
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
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index ddc0986..3bba5aa 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -4942,8 +4942,9 @@ _bfd_sparc_elf_plt_sym_val (bfd_vma i, const asection *plt, const arelent *rel)
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;
@@ -4974,9 +4975,8 @@ _bfd_sparc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
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;
}
diff --git a/bfd/elfxx-sparc.h b/bfd/elfxx-sparc.h
index 5140942..f7ac456 100644
--- a/bfd/elfxx-sparc.h
+++ b/bfd/elfxx-sparc.h
@@ -145,4 +145,4 @@ extern bfd_boolean _bfd_sparc_elf_object_p
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 *);
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index 6bab686..c6a9466 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -223,7 +223,7 @@
#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 \
diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c
index 419ca2f..b318306 100644
--- a/bfd/elfxx-tilegx.c
+++ b/bfd/elfxx-tilegx.c
@@ -4426,8 +4426,9 @@ tilegx_additional_program_headers (bfd *abfd,
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);
diff --git a/bfd/elfxx-tilegx.h b/bfd/elfxx-tilegx.h
index 3c47d7e..c962bc0 100644
--- a/bfd/elfxx-tilegx.h
+++ b/bfd/elfxx-tilegx.h
@@ -96,4 +96,4 @@ extern bfd_boolean
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 *);
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index 83ddd8b..833e1e6 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -262,7 +262,7 @@ extern bfd_boolean _bfd_generic_get_section_contents_in_window
#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 \
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index c6f8ecc..83ffc6a 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -267,7 +267,7 @@ extern bfd_boolean _bfd_generic_get_section_contents_in_window
#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 \
@@ -3154,7 +3154,7 @@ void *bfd_arch_default_fill (bfd_size_type count,
/* Extracted from linker.c. */
bfd_boolean _bfd_generic_verify_endian_match
- (bfd *ibfd, bfd *obfd);
+ (bfd *ibfd, struct bfd_link_info *info);
#ifdef __cplusplus
}
diff --git a/bfd/linker.c b/bfd/linker.c
index 7830b29..a5c93da 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -3338,20 +3338,20 @@ FUNCTION
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))
*/
/*
@@ -3360,7 +3360,7 @@ INTERNAL_FUNCTION
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
@@ -3369,8 +3369,10 @@ DESCRIPTION
*/
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)
diff --git a/bfd/targets.c b/bfd/targets.c
index 19d442a..a0fd7df 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -291,7 +291,7 @@ BFD_JUMP_TABLE macros.
. 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) \