1@section @code{typedef bfd} 2A BFD has type @code{bfd}; objects of this type are the 3cornerstone of any application using BFD. Using BFD 4consists of making references though the BFD and to data in the BFD. 5 6Here is the structure that defines the type @code{bfd}. It 7contains the major data about the file and pointers 8to the rest of the data. 9 10 11@example 12 13struct bfd 14@{ 15 /* A unique identifier of the BFD */ 16 unsigned int id; 17 18 /* The filename the application opened the BFD with. */ 19 const char *filename; 20 21 /* A pointer to the target jump table. */ 22 const struct bfd_target *xvec; 23 24 /* The IOSTREAM, and corresponding IO vector that provide access 25 to the file backing the BFD. */ 26 void *iostream; 27 const struct bfd_iovec *iovec; 28 29 /* Is the file descriptor being cached? That is, can it be closed as 30 needed, and re-opened when accessed later? */ 31 bfd_boolean cacheable; 32 33 /* Marks whether there was a default target specified when the 34 BFD was opened. This is used to select which matching algorithm 35 to use to choose the back end. */ 36 bfd_boolean target_defaulted; 37 38 /* The caching routines use these to maintain a 39 least-recently-used list of BFDs. */ 40 struct bfd *lru_prev, *lru_next; 41 42 /* When a file is closed by the caching routines, BFD retains 43 state information on the file here... */ 44 ufile_ptr where; 45 46 /* ... and here: (``once'' means at least once). */ 47 bfd_boolean opened_once; 48 49 /* Set if we have a locally maintained mtime value, rather than 50 getting it from the file each time. */ 51 bfd_boolean mtime_set; 52 53 /* File modified time, if mtime_set is TRUE. */ 54 long mtime; 55 56 /* Reserved for an unimplemented file locking extension. */ 57 int ifd; 58 59 /* The format which belongs to the BFD. (object, core, etc.) */ 60 bfd_format format; 61 62 /* The direction with which the BFD was opened. */ 63 enum bfd_direction 64 @{ 65 no_direction = 0, 66 read_direction = 1, 67 write_direction = 2, 68 both_direction = 3 69 @} 70 direction; 71 72 /* Format_specific flags. */ 73 flagword flags; 74 75 /* Currently my_archive is tested before adding origin to 76 anything. I believe that this can become always an add of 77 origin, with origin set to 0 for non archive files. */ 78 ufile_ptr origin; 79 80 /* Remember when output has begun, to stop strange things 81 from happening. */ 82 bfd_boolean output_has_begun; 83 84 /* A hash table for section names. */ 85 struct bfd_hash_table section_htab; 86 87 /* Pointer to linked list of sections. */ 88 struct bfd_section *sections; 89 90 /* The place where we add to the section list. */ 91 struct bfd_section **section_tail; 92 93 /* The number of sections. */ 94 unsigned int section_count; 95 96 /* Stuff only useful for object files: 97 The start address. */ 98 bfd_vma start_address; 99 100 /* Used for input and output. */ 101 unsigned int symcount; 102 103 /* Symbol table for output BFD (with symcount entries). */ 104 struct bfd_symbol **outsymbols; 105 106 /* Used for slurped dynamic symbol tables. */ 107 unsigned int dynsymcount; 108 109 /* Pointer to structure which contains architecture information. */ 110 const struct bfd_arch_info *arch_info; 111 112 /* Flag set if symbols from this BFD should not be exported. */ 113 bfd_boolean no_export; 114 115 /* Stuff only useful for archives. */ 116 void *arelt_data; 117 struct bfd *my_archive; /* The containing archive BFD. */ 118 struct bfd *next; /* The next BFD in the archive. */ 119 struct bfd *archive_head; /* The first BFD in the archive. */ 120 bfd_boolean has_armap; 121 122 /* A chain of BFD structures involved in a link. */ 123 struct bfd *link_next; 124 125 /* A field used by _bfd_generic_link_add_archive_symbols. This will 126 be used only for archive elements. */ 127 int archive_pass; 128 129 /* Used by the back end to hold private data. */ 130 union 131 @{ 132 struct aout_data_struct *aout_data; 133 struct artdata *aout_ar_data; 134 struct _oasys_data *oasys_obj_data; 135 struct _oasys_ar_data *oasys_ar_data; 136 struct coff_tdata *coff_obj_data; 137 struct pe_tdata *pe_obj_data; 138 struct xcoff_tdata *xcoff_obj_data; 139 struct ecoff_tdata *ecoff_obj_data; 140 struct ieee_data_struct *ieee_data; 141 struct ieee_ar_data_struct *ieee_ar_data; 142 struct srec_data_struct *srec_data; 143 struct ihex_data_struct *ihex_data; 144 struct tekhex_data_struct *tekhex_data; 145 struct elf_obj_tdata *elf_obj_data; 146 struct nlm_obj_tdata *nlm_obj_data; 147 struct bout_data_struct *bout_data; 148 struct mmo_data_struct *mmo_data; 149 struct sun_core_struct *sun_core_data; 150 struct sco5_core_struct *sco5_core_data; 151 struct trad_core_struct *trad_core_data; 152 struct som_data_struct *som_data; 153 struct hpux_core_struct *hpux_core_data; 154 struct hppabsd_core_struct *hppabsd_core_data; 155 struct sgi_core_struct *sgi_core_data; 156 struct lynx_core_struct *lynx_core_data; 157 struct osf_core_struct *osf_core_data; 158 struct cisco_core_struct *cisco_core_data; 159 struct versados_data_struct *versados_data; 160 struct netbsd_core_struct *netbsd_core_data; 161 struct mach_o_data_struct *mach_o_data; 162 struct mach_o_fat_data_struct *mach_o_fat_data; 163 struct bfd_pef_data_struct *pef_data; 164 struct bfd_pef_xlib_data_struct *pef_xlib_data; 165 struct bfd_sym_data_struct *sym_data; 166 void *any; 167 @} 168 tdata; 169 170 /* Used by the application to hold private data. */ 171 void *usrdata; 172 173 /* Where all the allocated stuff under this BFD goes. This is a 174 struct objalloc *, but we use void * to avoid requiring the inclusion 175 of objalloc.h. */ 176 void *memory; 177@}; 178 179@end example 180@section Error reporting 181Most BFD functions return nonzero on success (check their 182individual documentation for precise semantics). On an error, 183they call @code{bfd_set_error} to set an error condition that callers 184can check by calling @code{bfd_get_error}. 185If that returns @code{bfd_error_system_call}, then check 186@code{errno}. 187 188The easiest way to report a BFD error to the user is to 189use @code{bfd_perror}. 190 191@subsection Type @code{bfd_error_type} 192The values returned by @code{bfd_get_error} are defined by the 193enumerated type @code{bfd_error_type}. 194 195 196@example 197 198typedef enum bfd_error 199@{ 200 bfd_error_no_error = 0, 201 bfd_error_system_call, 202 bfd_error_invalid_target, 203 bfd_error_wrong_format, 204 bfd_error_wrong_object_format, 205 bfd_error_invalid_operation, 206 bfd_error_no_memory, 207 bfd_error_no_symbols, 208 bfd_error_no_armap, 209 bfd_error_no_more_archived_files, 210 bfd_error_malformed_archive, 211 bfd_error_file_not_recognized, 212 bfd_error_file_ambiguously_recognized, 213 bfd_error_no_contents, 214 bfd_error_nonrepresentable_section, 215 bfd_error_no_debug_section, 216 bfd_error_bad_value, 217 bfd_error_file_truncated, 218 bfd_error_file_too_big, 219 bfd_error_invalid_error_code 220@} 221bfd_error_type; 222 223@end example 224@findex bfd_get_error 225@subsubsection @code{bfd_get_error} 226@strong{Synopsis} 227@example 228bfd_error_type bfd_get_error (void); 229@end example 230@strong{Description}@* 231Return the current BFD error condition. 232 233@findex bfd_set_error 234@subsubsection @code{bfd_set_error} 235@strong{Synopsis} 236@example 237void bfd_set_error (bfd_error_type error_tag); 238@end example 239@strong{Description}@* 240Set the BFD error condition to be @var{error_tag}. 241 242@findex bfd_errmsg 243@subsubsection @code{bfd_errmsg} 244@strong{Synopsis} 245@example 246const char *bfd_errmsg (bfd_error_type error_tag); 247@end example 248@strong{Description}@* 249Return a string describing the error @var{error_tag}, or 250the system error if @var{error_tag} is @code{bfd_error_system_call}. 251 252@findex bfd_perror 253@subsubsection @code{bfd_perror} 254@strong{Synopsis} 255@example 256void bfd_perror (const char *message); 257@end example 258@strong{Description}@* 259Print to the standard error stream a string describing the 260last BFD error that occurred, or the last system error if 261the last BFD error was a system call failure. If @var{message} 262is non-NULL and non-empty, the error string printed is preceded 263by @var{message}, a colon, and a space. It is followed by a newline. 264 265@subsection BFD error handler 266Some BFD functions want to print messages describing the 267problem. They call a BFD error handler function. This 268function may be overridden by the program. 269 270The BFD error handler acts like printf. 271 272 273@example 274 275typedef void (*bfd_error_handler_type) (const char *, ...); 276 277@end example 278@findex bfd_set_error_handler 279@subsubsection @code{bfd_set_error_handler} 280@strong{Synopsis} 281@example 282bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); 283@end example 284@strong{Description}@* 285Set the BFD error handler function. Returns the previous 286function. 287 288@findex bfd_set_error_program_name 289@subsubsection @code{bfd_set_error_program_name} 290@strong{Synopsis} 291@example 292void bfd_set_error_program_name (const char *); 293@end example 294@strong{Description}@* 295Set the program name to use when printing a BFD error. This 296is printed before the error message followed by a colon and 297space. The string must not be changed after it is passed to 298this function. 299 300@findex bfd_get_error_handler 301@subsubsection @code{bfd_get_error_handler} 302@strong{Synopsis} 303@example 304bfd_error_handler_type bfd_get_error_handler (void); 305@end example 306@strong{Description}@* 307Return the BFD error handler function. 308 309@section Symbols 310 311 312@findex bfd_get_reloc_upper_bound 313@subsubsection @code{bfd_get_reloc_upper_bound} 314@strong{Synopsis} 315@example 316long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); 317@end example 318@strong{Description}@* 319Return the number of bytes required to store the 320relocation information associated with section @var{sect} 321attached to bfd @var{abfd}. If an error occurs, return -1. 322 323@findex bfd_canonicalize_reloc 324@subsubsection @code{bfd_canonicalize_reloc} 325@strong{Synopsis} 326@example 327long bfd_canonicalize_reloc 328 (bfd *abfd, asection *sec, arelent **loc, asymbol **syms); 329@end example 330@strong{Description}@* 331Call the back end associated with the open BFD 332@var{abfd} and translate the external form of the relocation 333information attached to @var{sec} into the internal canonical 334form. Place the table into memory at @var{loc}, which has 335been preallocated, usually by a call to 336@code{bfd_get_reloc_upper_bound}. Returns the number of relocs, or 337-1 on error. 338 339The @var{syms} table is also needed for horrible internal magic 340reasons. 341 342@findex bfd_set_reloc 343@subsubsection @code{bfd_set_reloc} 344@strong{Synopsis} 345@example 346void bfd_set_reloc 347 (bfd *abfd, asection *sec, arelent **rel, unsigned int count); 348@end example 349@strong{Description}@* 350Set the relocation pointer and count within 351section @var{sec} to the values @var{rel} and @var{count}. 352The argument @var{abfd} is ignored. 353 354@findex bfd_set_file_flags 355@subsubsection @code{bfd_set_file_flags} 356@strong{Synopsis} 357@example 358bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); 359@end example 360@strong{Description}@* 361Set the flag word in the BFD @var{abfd} to the value @var{flags}. 362 363Possible errors are: 364@itemize @bullet 365 366@item 367@code{bfd_error_wrong_format} - The target bfd was not of object format. 368@item 369@code{bfd_error_invalid_operation} - The target bfd was open for reading. 370@item 371@code{bfd_error_invalid_operation} - 372The flag word contained a bit which was not applicable to the 373type of file. E.g., an attempt was made to set the @code{D_PAGED} bit 374on a BFD format which does not support demand paging. 375@end itemize 376 377@findex bfd_get_arch_size 378@subsubsection @code{bfd_get_arch_size} 379@strong{Synopsis} 380@example 381int bfd_get_arch_size (bfd *abfd); 382@end example 383@strong{Description}@* 384Returns the architecture address size, in bits, as determined 385by the object file's format. For ELF, this information is 386included in the header. 387 388@strong{Returns}@* 389Returns the arch size in bits if known, @code{-1} otherwise. 390 391@findex bfd_get_sign_extend_vma 392@subsubsection @code{bfd_get_sign_extend_vma} 393@strong{Synopsis} 394@example 395int bfd_get_sign_extend_vma (bfd *abfd); 396@end example 397@strong{Description}@* 398Indicates if the target architecture "naturally" sign extends 399an address. Some architectures implicitly sign extend address 400values when they are converted to types larger than the size 401of an address. For instance, bfd_get_start_address() will 402return an address sign extended to fill a bfd_vma when this is 403the case. 404 405@strong{Returns}@* 406Returns @code{1} if the target architecture is known to sign 407extend addresses, @code{0} if the target architecture is known to 408not sign extend addresses, and @code{-1} otherwise. 409 410@findex bfd_set_start_address 411@subsubsection @code{bfd_set_start_address} 412@strong{Synopsis} 413@example 414bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma); 415@end example 416@strong{Description}@* 417Make @var{vma} the entry point of output BFD @var{abfd}. 418 419@strong{Returns}@* 420Returns @code{TRUE} on success, @code{FALSE} otherwise. 421 422@findex bfd_get_gp_size 423@subsubsection @code{bfd_get_gp_size} 424@strong{Synopsis} 425@example 426unsigned int bfd_get_gp_size (bfd *abfd); 427@end example 428@strong{Description}@* 429Return the maximum size of objects to be optimized using the GP 430register under MIPS ECOFF. This is typically set by the @code{-G} 431argument to the compiler, assembler or linker. 432 433@findex bfd_set_gp_size 434@subsubsection @code{bfd_set_gp_size} 435@strong{Synopsis} 436@example 437void bfd_set_gp_size (bfd *abfd, unsigned int i); 438@end example 439@strong{Description}@* 440Set the maximum size of objects to be optimized using the GP 441register under ECOFF or MIPS ELF. This is typically set by 442the @code{-G} argument to the compiler, assembler or linker. 443 444@findex bfd_scan_vma 445@subsubsection @code{bfd_scan_vma} 446@strong{Synopsis} 447@example 448bfd_vma bfd_scan_vma (const char *string, const char **end, int base); 449@end example 450@strong{Description}@* 451Convert, like @code{strtoul}, a numerical expression 452@var{string} into a @code{bfd_vma} integer, and return that integer. 453(Though without as many bells and whistles as @code{strtoul}.) 454The expression is assumed to be unsigned (i.e., positive). 455If given a @var{base}, it is used as the base for conversion. 456A base of 0 causes the function to interpret the string 457in hex if a leading "0x" or "0X" is found, otherwise 458in octal if a leading zero is found, otherwise in decimal. 459 460If the value would overflow, the maximum @code{bfd_vma} value is 461returned. 462 463@findex bfd_copy_private_header_data 464@subsubsection @code{bfd_copy_private_header_data} 465@strong{Synopsis} 466@example 467bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); 468@end example 469@strong{Description}@* 470Copy private BFD header information from the BFD @var{ibfd} to the 471the BFD @var{obfd}. This copies information that may require 472sections to exist, but does not require symbol tables. Return 473@code{true} on success, @code{false} on error. 474Possible error returns are: 475 476@itemize @bullet 477 478@item 479@code{bfd_error_no_memory} - 480Not enough memory exists to create private data for @var{obfd}. 481@end itemize 482@example 483#define bfd_copy_private_header_data(ibfd, obfd) \ 484 BFD_SEND (obfd, _bfd_copy_private_header_data, \ 485 (ibfd, obfd)) 486@end example 487 488@findex bfd_copy_private_bfd_data 489@subsubsection @code{bfd_copy_private_bfd_data} 490@strong{Synopsis} 491@example 492bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); 493@end example 494@strong{Description}@* 495Copy private BFD information from the BFD @var{ibfd} to the 496the BFD @var{obfd}. Return @code{TRUE} on success, @code{FALSE} on error. 497Possible error returns are: 498 499@itemize @bullet 500 501@item 502@code{bfd_error_no_memory} - 503Not enough memory exists to create private data for @var{obfd}. 504@end itemize 505@example 506#define bfd_copy_private_bfd_data(ibfd, obfd) \ 507 BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ 508 (ibfd, obfd)) 509@end example 510 511@findex bfd_merge_private_bfd_data 512@subsubsection @code{bfd_merge_private_bfd_data} 513@strong{Synopsis} 514@example 515bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); 516@end example 517@strong{Description}@* 518Merge private BFD information from the BFD @var{ibfd} to the 519the output file BFD @var{obfd} when linking. Return @code{TRUE} 520on success, @code{FALSE} on error. Possible error returns are: 521 522@itemize @bullet 523 524@item 525@code{bfd_error_no_memory} - 526Not enough memory exists to create private data for @var{obfd}. 527@end itemize 528@example 529#define bfd_merge_private_bfd_data(ibfd, obfd) \ 530 BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ 531 (ibfd, obfd)) 532@end example 533 534@findex bfd_set_private_flags 535@subsubsection @code{bfd_set_private_flags} 536@strong{Synopsis} 537@example 538bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); 539@end example 540@strong{Description}@* 541Set private BFD flag information in the BFD @var{abfd}. 542Return @code{TRUE} on success, @code{FALSE} on error. Possible error 543returns are: 544 545@itemize @bullet 546 547@item 548@code{bfd_error_no_memory} - 549Not enough memory exists to create private data for @var{obfd}. 550@end itemize 551@example 552#define bfd_set_private_flags(abfd, flags) \ 553 BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags)) 554@end example 555 556@findex Other functions 557@subsubsection @code{Other functions} 558@strong{Description}@* 559The following functions exist but have not yet been documented. 560@example 561#define bfd_sizeof_headers(abfd, reloc) \ 562 BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc)) 563 564#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ 565 BFD_SEND (abfd, _bfd_find_nearest_line, \ 566 (abfd, sec, syms, off, file, func, line)) 567 568#define bfd_debug_info_start(abfd) \ 569 BFD_SEND (abfd, _bfd_debug_info_start, (abfd)) 570 571#define bfd_debug_info_end(abfd) \ 572 BFD_SEND (abfd, _bfd_debug_info_end, (abfd)) 573 574#define bfd_debug_info_accumulate(abfd, section) \ 575 BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section)) 576 577#define bfd_stat_arch_elt(abfd, stat) \ 578 BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat)) 579 580#define bfd_update_armap_timestamp(abfd) \ 581 BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd)) 582 583#define bfd_set_arch_mach(abfd, arch, mach)\ 584 BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach)) 585 586#define bfd_relax_section(abfd, section, link_info, again) \ 587 BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again)) 588 589#define bfd_gc_sections(abfd, link_info) \ 590 BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info)) 591 592#define bfd_merge_sections(abfd, link_info) \ 593 BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) 594 595#define bfd_is_group_section(abfd, sec) \ 596 BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec)) 597 598#define bfd_discard_group(abfd, sec) \ 599 BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) 600 601#define bfd_link_hash_table_create(abfd) \ 602 BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) 603 604#define bfd_link_hash_table_free(abfd, hash) \ 605 BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) 606 607#define bfd_link_add_symbols(abfd, info) \ 608 BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) 609 610#define bfd_link_just_syms(sec, info) \ 611 BFD_SEND (abfd, _bfd_link_just_syms, (sec, info)) 612 613#define bfd_final_link(abfd, info) \ 614 BFD_SEND (abfd, _bfd_final_link, (abfd, info)) 615 616#define bfd_free_cached_info(abfd) \ 617 BFD_SEND (abfd, _bfd_free_cached_info, (abfd)) 618 619#define bfd_get_dynamic_symtab_upper_bound(abfd) \ 620 BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd)) 621 622#define bfd_print_private_bfd_data(abfd, file)\ 623 BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file)) 624 625#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \ 626 BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols)) 627 628#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \ 629 BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \ 630 dyncount, dynsyms, ret)) 631 632#define bfd_get_dynamic_reloc_upper_bound(abfd) \ 633 BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd)) 634 635#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \ 636 BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms)) 637 638extern bfd_byte *bfd_get_relocated_section_contents 639 (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, 640 bfd_boolean, asymbol **); 641 642@end example 643 644@findex bfd_alt_mach_code 645@subsubsection @code{bfd_alt_mach_code} 646@strong{Synopsis} 647@example 648bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); 649@end example 650@strong{Description}@* 651When more than one machine code number is available for the 652same machine type, this function can be used to switch between 653the preferred one (alternative == 0) and any others. Currently, 654only ELF supports this feature, with up to two alternate 655machine codes. 656 657 658@example 659struct bfd_preserve 660@{ 661 void *marker; 662 void *tdata; 663 flagword flags; 664 const struct bfd_arch_info *arch_info; 665 struct bfd_section *sections; 666 struct bfd_section **section_tail; 667 unsigned int section_count; 668 struct bfd_hash_table section_htab; 669@}; 670 671@end example 672@findex bfd_preserve_save 673@subsubsection @code{bfd_preserve_save} 674@strong{Synopsis} 675@example 676bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); 677@end example 678@strong{Description}@* 679When testing an object for compatibility with a particular 680target back-end, the back-end object_p function needs to set 681up certain fields in the bfd on successfully recognizing the 682object. This typically happens in a piecemeal fashion, with 683failures possible at many points. On failure, the bfd is 684supposed to be restored to its initial state, which is 685virtually impossible. However, restoring a subset of the bfd 686state works in practice. This function stores the subset and 687reinitializes the bfd. 688 689@findex bfd_preserve_restore 690@subsubsection @code{bfd_preserve_restore} 691@strong{Synopsis} 692@example 693void bfd_preserve_restore (bfd *, struct bfd_preserve *); 694@end example 695@strong{Description}@* 696This function restores bfd state saved by bfd_preserve_save. 697If MARKER is non-NULL in struct bfd_preserve then that block 698and all subsequently bfd_alloc'd memory is freed. 699 700@findex bfd_preserve_finish 701@subsubsection @code{bfd_preserve_finish} 702@strong{Synopsis} 703@example 704void bfd_preserve_finish (bfd *, struct bfd_preserve *); 705@end example 706@strong{Description}@* 707This function should be called when the bfd state saved by 708bfd_preserve_save is no longer needed. ie. when the back-end 709object_p function returns with success. 710 711