diff options
-rw-r--r-- | bfd/ChangeLog | 14 | ||||
-rw-r--r-- | bfd/elf32-bfin.c | 4 | ||||
-rw-r--r-- | bfd/elf32-frv.c | 4 | ||||
-rw-r--r-- | bfd/elf32-nds32.c | 4 | ||||
-rw-r--r-- | bfd/elf32-score.c | 4 | ||||
-rw-r--r-- | bfd/elf32-score7.c | 4 | ||||
-rw-r--r-- | bfd/elf32-sh.c | 4 | ||||
-rw-r--r-- | bfd/elf32-tic6x.c | 4 | ||||
-rw-r--r-- | bfd/elf64-ia64-vms.c | 4 | ||||
-rw-r--r-- | bfd/elfnn-ia64.c | 4 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 1 |
11 files changed, 51 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1413be6..fc1aca2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,6 +1,20 @@ 2020-05-01 Alan Modra <amodra@gmail.com> PR 25882 + * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Add FIXME. + * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise. + * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise. + * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise. + * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise. + * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise. + * elf32-sh.c (sh_elf_merge_private_data): Likewise. + * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise. + * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise. + * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise. + +2020-05-01 Alan Modra <amodra@gmail.com> + + PR 25882 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Ignore e_flags from shared libraries. diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index e5a83ba..e6383a7 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -4755,6 +4755,10 @@ elf32_bfin_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) flagword old_flags, new_flags; bfd_boolean error = FALSE; + /* FIXME: What should be checked when linking shared libraries? */ + if ((ibfd->flags & DYNAMIC) != 0) + return TRUE; + new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c index 056cc93..d2a18fd 100644 --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -6344,6 +6344,10 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) char new_opt[80]; char old_opt[80]; + /* FIXME: What should be checked when linking shared libraries? */ + if ((ibfd->flags & DYNAMIC) != 0) + return TRUE; + new_opt[0] = old_opt[0] = '\0'; new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index fc4d002..6b0b813 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -6817,6 +6817,10 @@ nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) flagword out_fpu_config; flagword in_fpu_config; + /* FIXME: What should be checked when linking shared libraries? */ + if ((ibfd->flags & DYNAMIC) != 0) + return TRUE; + /* TODO: Revise to use object-attributes instead. */ if (!nds32_check_vec_size (ibfd)) return FALSE; diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c index c5e6346..d1a910f 100644 --- a/bfd/elf32-score.c +++ b/bfd/elf32-score.c @@ -4021,6 +4021,10 @@ s3_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!_bfd_generic_verify_endian_match (ibfd, info)) return FALSE; + /* FIXME: What should be checked when linking shared libraries? */ + if ((ibfd->flags & DYNAMIC) != 0) + return TRUE; + in_flags = elf_elfheader (ibfd)->e_flags; out_flags = elf_elfheader (obfd)->e_flags; diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c index 0f647fe..ab5e32a 100644 --- a/bfd/elf32-score7.c +++ b/bfd/elf32-score7.c @@ -3826,6 +3826,10 @@ s7_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!_bfd_generic_verify_endian_match (ibfd, info)) return FALSE; + /* FIXME: What should be checked when linking shared libraries? */ + if ((ibfd->flags & DYNAMIC) != 0) + return TRUE; + in_flags = elf_elfheader (ibfd)->e_flags; out_flags = elf_elfheader (obfd)->e_flags; diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 24e879e..24203e0 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -6028,6 +6028,10 @@ sh_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; + /* FIXME: What should be checked when linking shared libraries? */ + if ((ibfd->flags & DYNAMIC) != 0) + return TRUE; + if (! is_sh_elf (ibfd) || ! is_sh_elf (obfd)) return TRUE; diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c index 95814d3..d07902f 100644 --- a/bfd/elf32-tic6x.c +++ b/bfd/elf32-tic6x.c @@ -3724,6 +3724,10 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) int i; int array_align_in, array_align_out, array_expect_in, array_expect_out; + /* FIXME: What should be checked when linking shared libraries? */ + if ((ibfd->flags & DYNAMIC) != 0) + return TRUE; + if (!elf_known_obj_attributes_proc (obfd)[0].i) { /* This is the first object. Copy the attributes. */ diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c index d40fa42..159698f 100644 --- a/bfd/elf64-ia64-vms.c +++ b/bfd/elf64-ia64-vms.c @@ -4233,6 +4233,10 @@ elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) flagword in_flags; bfd_boolean ok = TRUE; + /* FIXME: What should be checked when linking shared libraries? */ + if ((ibfd->flags & DYNAMIC) != 0) + return TRUE; + /* Don't even pretend to support mixed-format linking. */ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c index cd94158..0cdd6b5 100644 --- a/bfd/elfnn-ia64.c +++ b/bfd/elfnn-ia64.c @@ -4744,6 +4744,10 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) flagword in_flags; bfd_boolean ok = TRUE; + /* FIXME: What should be checked when linking shared libraries? */ + if ((ibfd->flags & DYNAMIC) != 0) + return TRUE; + if (!is_ia64_elf (ibfd) || !is_ia64_elf (obfd)) return TRUE; diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 2f26d7a..9ce205e 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -15767,6 +15767,7 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Check to see if the input BFD actually contains any sections. If not, then it has no attributes, and its flags may not have been initialized either, but it cannot actually cause any incompatibility. */ + /* FIXME: This excludes any input shared library from consideration. */ for (sec = ibfd->sections; sec != NULL; sec = sec->next) { /* Ignore synthetic sections and empty .text, .data and .bss sections |