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-10-03 17:04:55 +0100
commitedc8bbe90b82f1fa4f3f261b5c97503867e9aba4 (patch)
treecff2d2937f85c18d3c49d4d4e5c5dc50e54e0641 /libctf/ctf-open-bfd.c
parent7e97445a5a4797ba580a58c99d9e16836aa41188 (diff)
downloadgdb-edc8bbe90b82f1fa4f3f261b5c97503867e9aba4.zip
gdb-edc8bbe90b82f1fa4f3f261b5c97503867e9aba4.tar.gz
gdb-edc8bbe90b82f1fa4f3f261b5c97503867e9aba4.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 6fbbde8..1083c87 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))
{