mirror of
https://github.com/corda/corda.git
synced 2025-06-16 14:18:20 +00:00
directly emit codeimage as a object (binaryToObject is statically linked in), as a stepping stone to including extra symbols in said codeimage
This commit is contained in:
@ -45,7 +45,7 @@ writeObject(uint8_t* data, size_t size, OutputStream* out, const char* startName
|
||||
const char* architecture, unsigned alignment, bool writable,
|
||||
bool executable)
|
||||
{
|
||||
Platform* platform = Platform::getPlatform(PlatformInfo(os, architecture));
|
||||
Platform* platform = Platform::getPlatform(PlatformInfo(PlatformInfo::osFromString(os), PlatformInfo::archFromString(architecture)));
|
||||
|
||||
if(!platform) {
|
||||
fprintf(stderr, "unsupported platform: %s/%s\n", os, architecture);
|
||||
|
@ -11,6 +11,8 @@
|
||||
#ifndef AVIAN_TOOLS_H_
|
||||
#define AVIAN_TOOLS_H_
|
||||
|
||||
#include "environment.h"
|
||||
|
||||
namespace avian {
|
||||
|
||||
namespace tools {
|
||||
@ -96,11 +98,18 @@ public:
|
||||
class PlatformInfo {
|
||||
public:
|
||||
enum OperatingSystem {
|
||||
Linux, Windows, Darwin, UnknownOS
|
||||
Linux = AVIAN_PLATFORM_LINUX,
|
||||
Windows = AVIAN_PLATFORM_WINDOWS,
|
||||
Darwin = AVIAN_PLATFORM_DARWIN,
|
||||
UnknownOS = AVIAN_PLATFORM_UNKNOWN
|
||||
};
|
||||
|
||||
enum Architecture {
|
||||
x86, x86_64, PowerPC, Arm, UnknownArch
|
||||
x86 = AVIAN_ARCH_X86,
|
||||
x86_64 = AVIAN_ARCH_X86_64,
|
||||
PowerPC = AVIAN_ARCH_POWERPC,
|
||||
Arm = AVIAN_ARCH_ARM,
|
||||
UnknownArch = AVIAN_ARCH_UNKNOWN
|
||||
};
|
||||
|
||||
const OperatingSystem os;
|
||||
@ -113,10 +122,6 @@ public:
|
||||
os(os),
|
||||
arch(arch) {}
|
||||
|
||||
inline PlatformInfo(const char* os, const char* arch):
|
||||
os(osFromString(os)),
|
||||
arch(archFromString(arch)) {}
|
||||
|
||||
inline bool operator == (const PlatformInfo& other) {
|
||||
return os == other.os && arch == other.arch;
|
||||
}
|
||||
|
Reference in New Issue
Block a user