Lines Matching refs:abfd
91 bfd_check_format (bfd *abfd, bfd_format format) in bfd_check_format() argument
93 return bfd_check_format_matches (abfd, format, NULL); in bfd_check_format()
117 bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) in bfd_check_format_matches() argument
126 if (!bfd_read_p (abfd) in bfd_check_format_matches()
127 || (unsigned int) abfd->format >= (unsigned int) bfd_type_end) in bfd_check_format_matches()
133 if (abfd->format != bfd_unknown) in bfd_check_format_matches()
134 return abfd->format == format; in bfd_check_format_matches()
138 save_targ = abfd->xvec; in bfd_check_format_matches()
157 abfd->format = format; in bfd_check_format_matches()
160 if (!abfd->target_defaulted) in bfd_check_format_matches()
162 if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) /* rewind! */ in bfd_check_format_matches()
169 right_targ = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd)); in bfd_check_format_matches()
173 abfd->xvec = right_targ; /* Set the target as returned. */ in bfd_check_format_matches()
183 if (abfd->direction == both_direction) in bfd_check_format_matches()
184 abfd->output_has_begun = TRUE; in bfd_check_format_matches()
203 abfd->xvec = save_targ; in bfd_check_format_matches()
204 abfd->format = bfd_unknown; in bfd_check_format_matches()
222 || (!abfd->target_defaulted && *target == save_targ)) in bfd_check_format_matches()
225 abfd->xvec = *target; /* Change BFD's target temporarily. */ in bfd_check_format_matches()
227 if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) in bfd_check_format_matches()
240 temp = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd)); in bfd_check_format_matches()
275 abfd->xvec = save_targ; in bfd_check_format_matches()
276 abfd->format = bfd_unknown; in bfd_check_format_matches()
329 abfd->xvec = right_targ; /* Change BFD's target permanently. */ in bfd_check_format_matches()
339 if (abfd->direction == both_direction) in bfd_check_format_matches()
340 abfd->output_has_begun = TRUE; in bfd_check_format_matches()
345 abfd->xvec = save_targ; /* Restore original target type. */ in bfd_check_format_matches()
346 abfd->format = bfd_unknown; /* Restore original format. */ in bfd_check_format_matches()
391 bfd_set_format (bfd *abfd, bfd_format format) in bfd_set_format() argument
393 if (bfd_read_p (abfd) in bfd_set_format()
394 || (unsigned int) abfd->format >= (unsigned int) bfd_type_end) in bfd_set_format()
400 if (abfd->format != bfd_unknown) in bfd_set_format()
401 return abfd->format == format; in bfd_set_format()
404 abfd->format = format; in bfd_set_format()
406 if (!BFD_SEND_FMT (abfd, _bfd_set_format, (abfd))) in bfd_set_format()
408 abfd->format = bfd_unknown; in bfd_set_format()