[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
bfd_check_format
bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); |
bfd_object
,
bfd_archive
or bfd_core
).
If the BFD has been set to a specific target before the
call, only the named target and format combination is
checked. If the target has not been set, or has been set to
default
, then all the known target backends is
interrogated to determine a match. If the default target
matches, it is used. If not, exactly one target must recognize
the file, or an error results.
The function returns TRUE
on success, otherwise FALSE
with one of the following error codes:
bfd_error_invalid_operation
-
if format
is not one of bfd_object
, bfd_archive
or
bfd_core
.
bfd_error_system_call
-
if an error occured during a read - even some file mismatches
can cause bfd_error_system_calls.
file_not_recognised
-
none of the backends recognised the file format.
bfd_error_file_ambiguously_recognized
-
more than one backend recognised the file format.