From: Maciej W. Rozycki Date: Thu, 23 Jul 2020 19:24:58 +0000 (+0100) Subject: PR ld/26288: Revert obsolete part of PR ld/26047 fix X-Git-Tag: binutils-2_35~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b6165529df6a759d65fc786a44eb28e226b81ad;p=thirdparty%2Fbinutils-gdb.git PR ld/26288: Revert obsolete part of PR ld/26047 fix Revert commit a3fc941881e4 ("Stop the linker from accepting executable ELF files as inputs to other links."), which has been made obsolete by commit a87e1817a435 ("Have the linker fail if any attempt to link in an executable is made."). An earlier check triggers added with the latter commit making the piece of code removed dead. ld/ PR ld/26288 Revert: PR 26047 * ldelf.c (ldelf_after_open): Fail if attempting to link one executable into another. (cherry picked from commit b5dd7120f6bcbd1fe650b8839a53b2bd423fbf60) --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 9a865f4a18b..b8e7677e10f 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2020-07-23 Maciej W. Rozycki + + PR ld/26288 + + Revert: + PR 26047 + * ldelf.c (ldelf_after_open): Fail if attempting to link one + executable into another. + 2020-07-22 H.J. Lu PR ld/26262 diff --git a/ld/ldelf.c b/ld/ldelf.c index 0df3914258f..1c51a572268 100644 --- a/ld/ldelf.c +++ b/ld/ldelf.c @@ -1078,13 +1078,6 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd, { int type = 0; - if (bfd_link_executable (& link_info) - && elf_tdata (abfd)->elf_header->e_type == ET_EXEC) - { - einfo (_("%P: Using an executable file (%pB) as input to a link is deprecated - support is likely to be removed in the future\n"), - abfd); - } - if (bfd_input_just_syms (abfd)) continue;