This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] ia64: don't fail when converting binary into ELF
- From: Sergei Trofimovich <slyfox at gentoo dot org>
- To: binutils at sourceware dot org
- Cc: Sergei Trofimovich <slyfox at gentoo dot org>
- Date: Thu, 26 Dec 2019 10:40:30 +0000
- Subject: [PATCH] ia64: don't fail when converting binary into ELF
From: Sergei Trofimovich <siarheit@google.com>
In ld/PR25316 ia64 is a rare target that fails the following test:
$ echo hi > hello.123
$ ia64-unknown-linux-gnu-ld -r -b binary hello.123 -o hello.o
ia64-unknown-linux-gnu-ld: failed to merge target specific data of file hello.123
There is no need to support binary merging explicitly (as other targets).
bfd/ChangeLog
2019-12-26 Sergei Trofimovich <siarheit@google.com>
* elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
on binary inputs ld/PR25316.
---
bfd/ChangeLog | 5 +++++
bfd/elfnn-ia64.c | 3 +--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 073bbb6f2b..5448af5305 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2019-12-26 Sergei Trofimovich <siarheit@google.com>
+
+ * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
+ on binary inputs ld/PR25316.
+
2019-12-23 Alan Modra <amodra@gmail.com>
* vms-alpha.c (add_symbol): Add "max" parameter. Error on string
diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c
index 459d986c03..338fd5ff93 100644
--- a/bfd/elfnn-ia64.c
+++ b/bfd/elfnn-ia64.c
@@ -4740,10 +4740,9 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
flagword in_flags;
bfd_boolean ok = 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)
- return FALSE;
+ return TRUE;
in_flags = elf_elfheader (ibfd)->e_flags;
out_flags = elf_elfheader (obfd)->e_flags;
--
2.24.1