51#if defined(__linux__) || defined(__FreeBSD_kernel__) || \
52 defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \
70 "--remove-section",
"goto-cc",
77 message.
warning() <<
"cannot merge EFI binaries: goto-cc section lost"
88 message.
error() <<
"Remove failed: " << std::strerror(
errno)
94#elif defined(__APPLE__)
122 message.
error() <<
"Setting execute permissions failed: "
131 std::vector<std::string>
ld_argv = {
"ld",
148 message.
error() <<
"Remove failed: " << std::strerror(
errno)
160 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
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)