aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-open-bfd.c
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2019-07-26 21:52:11 +0100
committerNick Alcock <nick.alcock@oracle.com>2019-09-23 14:12:54 +0100
commitfba72c8c05c56493fc78a4328b4969b9f136ee0c (patch)
tree50ab7538a513ec7c454a793f38b638ebd2b57770 /libctf/ctf-open-bfd.c
parentdeb9b901992c5b2043430dd178c3b94d8fe97376 (diff)
downloadbinutils-fba72c8c05c56493fc78a4328b4969b9f136ee0c.zip
binutils-fba72c8c05c56493fc78a4328b4969b9f136ee0c.tar.gz
binutils-fba72c8c05c56493fc78a4328b4969b9f136ee0c.tar.bz2
libctf: bfd-open: mark the bfd as cacheable
Without this, the FD is only closed when the CTF file is, leading to running out of fds on (e.g.) very large links. New in v3. libctf/ * ctf-open-bfd.c (ctf_fdopen): Call bfd_set_cacheable.
Diffstat (limited to 'libctf/ctf-open-bfd.c')
-rw-r--r--libctf/ctf-open-bfd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libctf/ctf-open-bfd.c b/libctf/ctf-open-bfd.c
index 1e0fe23..da62463 100644
--- a/libctf/ctf-open-bfd.c
+++ b/libctf/ctf-open-bfd.c
@@ -312,6 +312,7 @@ ctf_fdopen (int fd, const char *filename, const char *target, int *errp)
bfd_errmsg (bfd_get_error()));
return (ctf_set_open_errno (errp, ECTF_FMT));
}
+ bfd_set_cacheable (abfd, 1);
if (!bfd_check_format (abfd, bfd_object))
{