aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@wdc.com>2020-07-23 20:11:29 +0100
committerMaciej W. Rozycki <macro@wdc.com>2020-07-23 20:11:29 +0100
commitb5dd7120f6bcbd1fe650b8839a53b2bd423fbf60 (patch)
tree1792b492ac963487608c88f6ba15b773c90edd88 /ld
parente7bc9db8f447e056f4faa11702230239b4075c2c (diff)
downloadgdb-b5dd7120f6bcbd1fe650b8839a53b2bd423fbf60.zip
gdb-b5dd7120f6bcbd1fe650b8839a53b2bd423fbf60.tar.gz
gdb-b5dd7120f6bcbd1fe650b8839a53b2bd423fbf60.tar.bz2
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.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog9
-rw-r--r--ld/ldelf.c7
2 files changed, 9 insertions, 7 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index cb49784..3bf9e61 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,12 @@
+2020-07-23 Maciej W. Rozycki <macro@wdc.com>
+
+ PR ld/26288
+
+ Revert:
+ PR 26047
+ * ldelf.c (ldelf_after_open): Fail if attempting to link one
+ executable into another.
+
2020-07-22 Nick Alcock <nick.alcock@oracle.com>
* testsuite/ld-ctf/ctf.exp: Skip on non-ELF for now.
diff --git a/ld/ldelf.c b/ld/ldelf.c
index 6fa09cf..e972071 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 (_("%F%P: cannot use executable file '%pB' as input to a link\n"),
- abfd);
- }
-
if (bfd_input_just_syms (abfd))
continue;