51#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
68 "--remove-section",
"goto-cc",
75 message.
warning() <<
"cannot merge EFI binaries: goto-cc section lost"
86 message.
error() <<
"Remove failed: " << std::strerror(
errno)
92#elif defined(__APPLE__)
120 message.
error() <<
"Setting execute permissions failed: "
129 std::vector<std::string>
ld_argv = {
"ld",
146 message.
error() <<
"Remove failed: " << std::strerror(
errno)
158 message.
error() <<
"binary merging not implemented for this platform"
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Class that provides messages with a built-in verbosity 'level'.
mstreamt & warning() const
bool file_remove(const std::string &path)
C++17 will allow us to use std::filesystem::remove.
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, bool linking_efi)
Merges a goto binary into an object file (e.g.
std::string objcopy_command(const std::string &compiler_or_linker)
Return the name of the objcopy tool matching the chosen compiler or linker command.
Create hybrid binary with goto-binary section.
int run(const std::string &what, const std::vector< std::string > &argv)
bool has_suffix(const std::string &s, const std::string &suffix)