mirror of
https://codeberg.org/kiss-community/repo
synced 2024-07-04 23:12:28 +00:00
binutils: fix #303
This commit is contained in:
parent
7cb956ca68
commit
e2daa49642
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
patch -p1 < fix-fd-issue.patch
|
||||
|
||||
cat > makeinfo <<EOF
|
||||
#!/bin/sh
|
||||
printf 'makeinfo (GNU texinfo) 5.2\n'
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c
|
||||
9374c853799630e0aa0b3a97db260874418bbee3a21d8becad6a019c9f436636
|
||||
|
|
39
core/binutils/patches/fix-fd-issue.patch
Normal file
39
core/binutils/patches/fix-fd-issue.patch
Normal file
|
@ -0,0 +1,39 @@
|
|||
From 1c611b40e6bfc8029bff7696814330b5bc0ee5c0 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Mon, 26 Jul 2021 05:59:55 -0700
|
||||
Subject: [PATCH] bfd: Close the file descriptor if there is no archive fd
|
||||
|
||||
Close the file descriptor if there is no archive plugin file descriptor
|
||||
to avoid running out of file descriptors on thin archives with many
|
||||
archive members.
|
||||
|
||||
bfd/
|
||||
|
||||
PR ld/28138
|
||||
* plugin.c (bfd_plugin_close_file_descriptor): Close the file
|
||||
descriptor there is no archive plugin file descriptor.
|
||||
|
||||
(cherry picked from commit 5a98fb7513b559e20dfebdbaa2a471afda3b4742)
|
||||
(cherry picked from commit 7dc37e1e1209c80e0bab784df6b6bac335e836f2)
|
||||
---
|
||||
bfd/plugin.c | 8 +++++++
|
||||
|
||||
diff --git a/bfd/plugin.c b/bfd/plugin.c
|
||||
index 6cfa2b66470..3bab8febe88 100644
|
||||
--- a/bfd/plugin.c
|
||||
+++ b/bfd/plugin.c
|
||||
@@ -291,6 +291,14 @@ bfd_plugin_close_file_descriptor (bfd *abfd, int fd)
|
||||
&& !bfd_is_thin_archive (abfd->my_archive))
|
||||
abfd = abfd->my_archive;
|
||||
|
||||
+ /* Close the file descriptor if there is no archive plugin file
|
||||
+ descriptor. */
|
||||
+ if (abfd->archive_plugin_fd == -1)
|
||||
+ {
|
||||
+ close (fd);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
abfd->archive_plugin_fd_open_count--;
|
||||
/* Dup the archive plugin file descriptor for later use, which
|
||||
will be closed by _bfd_archive_close_and_cleanup. */
|
|
@ -1 +1,2 @@
|
|||
https://ftp.gnu.org/gnu/binutils/binutils-VERSION.tar.xz
|
||||
patches/fix-fd-issue.patch
|
||||
|
|
|
@ -1 +1 @@
|
|||
2.37 1
|
||||
2.37 2
|
||||
|
|
Loading…
Reference in New Issue
Block a user