From edc8bbe90b82f1fa4f3f261b5c97503867e9aba4 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Fri, 26 Jul 2019 21:52:11 +0100 Subject: 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. --- libctf/ctf-open-bfd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libctf/ctf-open-bfd.c') 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)) { -- cgit v1.1