Back to index

cell-binutils  2.17cvs20070401
Functions
output-file.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void output_file_append (char *where, long length, char *filename)
void output_file_close (char *filename)
void output_file_create (char *name)

Function Documentation

void output_file_append ( char *  where,
long  length,
char *  filename 
)
void output_file_close ( char *  filename)

Definition at line 54 of file output-file.c.

{
  bfd_boolean res;

  if (stdoutput == NULL)
    return;
    
  /* Close the bfd.  */
  res = bfd_close (stdoutput);

  /* Prevent an infinite loop - if the close failed we will call as_fatal
     which will call xexit() which may call this function again...  */
  stdoutput = NULL;

  if (! res)
    as_fatal (_("can't close %s: %s"), filename,
             bfd_errmsg (bfd_get_error ()));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void output_file_create ( char *  name)

Definition at line 32 of file output-file.c.

{
  if (name[0] == '-' && name[1] == '\0')
    as_fatal (_("can't open a bfd on stdout %s"), name);

  else if (!(stdoutput = bfd_openw (name, TARGET_FORMAT)))
    {
      bfd_error_type err = bfd_get_error ();

      if (err == bfd_error_invalid_target)
       as_fatal (_("selected target format '%s' unknown"), TARGET_FORMAT);
      else
       as_fatal (_("can't create %s: %s"), name, bfd_errmsg (err));
    }

  bfd_set_format (stdoutput, bfd_object);
  bfd_set_arch_mach (stdoutput, TARGET_ARCH, TARGET_MACH);
  if (flag_traditional_format)
    stdoutput->flags |= BFD_TRADITIONAL_FORMAT;
}

Here is the call graph for this function:

Here is the caller graph for this function: