GCC Middle and Back End API Reference
collect2.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct pex_objcollect_execute (const char *, char **, const char *, const char *, int flags)
 
int collect_wait (const char *, struct pex_obj *)
 
int file_exists (const char *)
 
void notice_translated (const char *,...) ATTRIBUTE_PRINTF_1
 
void notice (const char *,...) ATTRIBUTE_PRINTF_1
 

Variables

const charc_file_name
 
struct obstack temporary_obstack
 
chartemporary_firstobj
 
bool may_unlink_output_file
 
bool at_file_supplied
 

Function Documentation

◆ collect_execute()

struct pex_obj * collect_execute ( const char * ,
char ** ,
const char * ,
const char * ,
int flags )
extern
Header file for collect routines.
   Copyright (C) 1998-2024 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   

◆ collect_wait()

int collect_wait ( const char * prog,
struct pex_obj * pex )
extern
Wait for a process to finish, and exit if a nonzero status is found.   

References fatal_error(), ggc_alloc(), input_location, NULL, response_file, strsignal(), WCOREDUMP, WEXITSTATUS, WIFEXITED, WIFSIGNALED, and WTERMSIG.

Referenced by do_link(), and do_wait().

◆ file_exists()

int file_exists ( const char * name)
extern

References R_OK.

Referenced by maybe_unlink().

◆ notice()

void notice ( const char * cmsgid,
... )
extern
Notify user of a non-error.   
Utility functions used by tools like collect2 and lto-wrapper.
   Copyright (C) 2009-2024 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
Provided in collect-utils.cc.   

References _, ap, ggc_alloc(), and vfprintf().

Referenced by collect_execute(), main(), maybe_unlink(), and write_c_file_stat().

◆ notice_translated()

void notice_translated ( const char * cmsgid,
... )
extern
Notify user of a non-error, without translating the format string.   

References ap, ggc_alloc(), and vfprintf().

Referenced by main().

Variable Documentation

◆ at_file_supplied

◆ c_file_name

const char* c_file_name
extern

Referenced by main().

◆ may_unlink_output_file

bool may_unlink_output_file
extern
Whether we may unlink the output file, which should be set as soon as we
know we have successfully produced it.  This is typically useful to prevent
blindly attempting to unlink a read-only output that the target linker
would leave untouched.   

Referenced by do_link(), and maybe_unlink().

◆ temporary_firstobj

char* temporary_firstobj
extern

Referenced by main(), and maybe_run_lto_and_relink().

◆ temporary_obstack