Lines Matching defs:abfd

57 	bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
60 Verify if the file attached to the BFD @var{abfd} is compatible
91 bfd_check_format (bfd *abfd, bfd_format format)
93 return bfd_check_format_matches (abfd, format, NULL);
102 (bfd *abfd, bfd_format format, char ***matching);
117 bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
126 if (!bfd_read_p (abfd)
127 || (unsigned int) abfd->format >= (unsigned int) bfd_type_end)
133 if (abfd->format != bfd_unknown)
134 return abfd->format == format;
138 save_targ = abfd->xvec;
157 abfd->format = format;
160 if (!abfd->target_defaulted)
162 if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) /* rewind! */
169 right_targ = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
173 abfd->xvec = right_targ; /* Set the target as returned. */
183 if (abfd->direction == both_direction)
184 abfd->output_has_begun = TRUE;
203 abfd->xvec = save_targ;
204 abfd->format = bfd_unknown;
222 || (!abfd->target_defaulted && *target == save_targ))
225 abfd->xvec = *target; /* Change BFD's target temporarily. */
227 if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
240 temp = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
275 abfd->xvec = save_targ;
276 abfd->format = bfd_unknown;
329 abfd->xvec = right_targ; /* Change BFD's target permanently. */
339 if (abfd->direction == both_direction)
340 abfd->output_has_begun = TRUE;
345 abfd->xvec = save_targ; /* Restore original target type. */
346 abfd->format = bfd_unknown; /* Restore original format. */
381 bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
384 This function sets the file format of the BFD @var{abfd} to the
391 bfd_set_format (bfd *abfd, bfd_format format)
393 if (bfd_read_p (abfd)
394 || (unsigned int) abfd->format >= (unsigned int) bfd_type_end)
400 if (abfd->format != bfd_unknown)
401 return abfd->format == format;
404 abfd->format = format;
406 if (!BFD_SEND_FMT (abfd, _bfd_set_format, (abfd)))
408 abfd->format = bfd_unknown;