Go to the documentation of this file.
17 #define EX_SOFTWARE 70
55 if(cmdline.
isset(
"native-linker"))
56 return cmdline.
get_value(
"native-linker");
61 pos == std::string::npos || base_name ==
"goto-gcc" ||
62 base_name ==
"goto-ld")
65 std::string result = base_name;
66 result.replace(
pos, 7,
"ld");
73 goto_binary_tmp_suffix(
".goto-cc-saved")
133 if(arg.is_infile_name)
156 std::vector<std::string> new_argv;
159 new_argv.push_back(a.arg);
165 for(std::size_t i = 0; i < new_argv.size(); i++)
166 debug() <<
" " << new_argv[i];
174 std::string output_file;
180 if(output_file ==
"/dev/null")
184 output_file =
"a.out";
229 std::cout <<
"goto-ld understands the options of "
230 <<
"ld plus the following.\n\n";
gcc_message_handlert gcc_message_handler
Merge linker script-defined symbols into a goto-program.
virtual bool isset(char option) const
std::list< std::string > source_files
static std::string linker_name(const cmdlinet &cmdline, const std::string &base_name)
void help_mode() final
display command line help
int add_linker_script_definitions()
Add values of linkerscript-defined symbols to the goto-binary.
bool doit()
reads and source and object files, compiles and links them into goto program objects.
int run(const std::string &what, const std::vector< std::string > &argv)
std::list< std::string > libraries
Synthesise definitions of symbols that are defined in linker scripts.
const std::string base_name
std::string native_tool_name
Base class for command line interpretation.
std::string output_file_object
ld_modet(goto_cc_cmdlinet &_cmdline, const std::string &_base_name)
std::list< std::string > object_files
mstreamt & result() const
std::string output_file_executable
#define PRECONDITION(CONDITION)
int ld_hybrid_binary(compilet &compiler)
virtual std::string what() const =0
A human readable description of what went wrong.
std::string get_value(char option) const
std::list< std::string > library_paths
int hybrid_binary(const std::string &compiler_or_linker, const std::string &goto_binary_file, const std::string &output_file, bool building_executable, message_handlert &message_handler)
Merges a goto binary into an object file (e.g.
std::string object_file_extension
goto_cc_cmdlinet & cmdline
@ COMPILE_LINK_EXECUTABLE
bool add_input_file(const std::string &)
puts input file names into a list and does preprocessing for libraries.
Create hybrid binary with goto-binary section.
message_handlert & get_message_handler()
const std::string goto_binary_tmp_suffix
bool set(const cmdlinet &cmdline)
void help()
display command line help
unsignedbv_typet size_type()
static unsigned eval_verbosity(const std::string &user_input, const message_levelt default_verbosity, message_handlert &dest)
Parse a (user-)provided string as a verbosity level and set it as the verbosity of dest.
int run_ld()
call ld with original command line
const std::list< std::string > & get_values(const std::string &option) const
Base class for exceptions thrown in the cprover project.
void file_rename(const std::string &old_path, const std::string &new_path)
Rename a file.