OLD | NEW |
1 | 1 |
2 @example | 2 @example |
3 /* Set to N to open the next N BFDs using an alternate id space. */ | 3 /* Set to N to open the next N BFDs using an alternate id space. */ |
4 extern unsigned int bfd_use_reserved_id; | 4 extern unsigned int bfd_use_reserved_id; |
5 @end example | 5 @end example |
6 @section Opening and closing BFDs | 6 @section Opening and closing BFDs |
7 | 7 |
8 | 8 |
9 @subsection Functions for opening and closing | 9 @subsection Functions for opening and closing |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 Calls @code{bfd_find_target}, so @var{target} is interpreted as by | 26 Calls @code{bfd_find_target}, so @var{target} is interpreted as by |
27 that function. | 27 that function. |
28 | 28 |
29 The new BFD is marked as cacheable iff @var{fd} is -1. | 29 The new BFD is marked as cacheable iff @var{fd} is -1. |
30 | 30 |
31 If @code{NULL} is returned then an error has occured. Possible errors | 31 If @code{NULL} is returned then an error has occured. Possible errors |
32 are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} or | 32 are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} or |
33 @code{system_call} error. | 33 @code{system_call} error. |
34 | 34 |
| 35 On error, @var{fd} is always closed. |
| 36 |
35 @findex bfd_openr | 37 @findex bfd_openr |
36 @subsubsection @code{bfd_openr} | 38 @subsubsection @code{bfd_openr} |
37 @strong{Synopsis} | 39 @strong{Synopsis} |
38 @example | 40 @example |
39 bfd *bfd_openr (const char *filename, const char *target); | 41 bfd *bfd_openr (const char *filename, const char *target); |
40 @end example | 42 @end example |
41 @strong{Description}@* | 43 @strong{Description}@* |
42 Open the file @var{filename} (using @code{fopen}) with the target | 44 Open the file @var{filename} (using @code{fopen}) with the target |
43 @var{target}. Return a pointer to the created BFD. | 45 @var{target}. Return a pointer to the created BFD. |
44 | 46 |
(...skipping 21 matching lines...) Expand all Loading... |
66 descriptors for other opens), with the supplied @var{fd} used as | 68 descriptors for other opens), with the supplied @var{fd} used as |
67 an initial file descriptor (but subject to closure at any time), | 69 an initial file descriptor (but subject to closure at any time), |
68 call bfd_set_cacheable(bfd, 1) on the returned BFD. The default | 70 call bfd_set_cacheable(bfd, 1) on the returned BFD. The default |
69 is to assume no caching; the file descriptor will remain open | 71 is to assume no caching; the file descriptor will remain open |
70 until @code{bfd_close}, and will not be affected by BFD operations | 72 until @code{bfd_close}, and will not be affected by BFD operations |
71 on other files. | 73 on other files. |
72 | 74 |
73 Possible errors are @code{bfd_error_no_memory}, | 75 Possible errors are @code{bfd_error_no_memory}, |
74 @code{bfd_error_invalid_target} and @code{bfd_error_system_call}. | 76 @code{bfd_error_invalid_target} and @code{bfd_error_system_call}. |
75 | 77 |
| 78 On error, @var{fd} is closed. |
| 79 |
76 @findex bfd_openstreamr | 80 @findex bfd_openstreamr |
77 @subsubsection @code{bfd_openstreamr} | 81 @subsubsection @code{bfd_openstreamr} |
78 @strong{Synopsis} | 82 @strong{Synopsis} |
79 @example | 83 @example |
80 bfd *bfd_openstreamr (const char *, const char *, void *); | 84 bfd *bfd_openstreamr (const char *, const char *, void *); |
81 @end example | 85 @end example |
82 @strong{Description}@* | 86 @strong{Description}@* |
83 Open a BFD for read access on an existing stdio stream. When | 87 Open a BFD for read access on an existing stdio stream. When |
84 the BFD is passed to @code{bfd_close}, the stream will be closed. | 88 the BFD is passed to @code{bfd_close}, the stream will be closed. |
85 | 89 |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 @strong{Description}@* | 372 @strong{Description}@* |
369 Takes a @var{BFD} and containing a .gnu_debuglink section @var{SECT} | 373 Takes a @var{BFD} and containing a .gnu_debuglink section @var{SECT} |
370 and fills in the contents of the section to contain a link to the | 374 and fills in the contents of the section to contain a link to the |
371 specified @var{filename}. The filename should be relative to the | 375 specified @var{filename}. The filename should be relative to the |
372 current directory. | 376 current directory. |
373 | 377 |
374 @strong{Returns}@* | 378 @strong{Returns}@* |
375 @code{TRUE} is returned if all is ok. Otherwise @code{FALSE} is returned | 379 @code{TRUE} is returned if all is ok. Otherwise @code{FALSE} is returned |
376 and bfd_error is set. | 380 and bfd_error is set. |
377 | 381 |
OLD | NEW |