#ifndef __EXECUTABLEFILE__
#define __EXECUTABLEFILE__
#include <stdint.h>
#include <vector>
#include "ObjectFile.h"
#include "Options.h"
namespace ExecutableFile {
struct DyLibUsed
{
ObjectFile::Reader* reader;
DynamicLibraryOptions options;
};
class Writer : public ObjectFile::Reader
{
public:
virtual ~Writer() {};
virtual const char* getPath() = 0;
virtual std::vector<class ObjectFile::Atom*>& getAtoms() = 0;
virtual std::vector<class ObjectFile::Atom*>* getJustInTimeAtomsFor(const char* name) = 0;
virtual ObjectFile::Atom& makeObjcInfoAtom(ObjectFile::Reader::ObjcConstraint objcContraint,
bool objcReplacementClasses) = 0;
virtual class ObjectFile::Atom* getUndefinedProxyAtom(const char* name) = 0;
virtual uint64_t write(std::vector<class ObjectFile::Atom*>& atoms,
std::vector<class ObjectFile::Reader::Stab>& stabs,
class ObjectFile::Atom* entryPointAtom,
class ObjectFile::Atom* dyldHelperAtom,
bool createUUID, bool canScatter,
ObjectFile::Reader::CpuConstraint cpuConstraint,
bool biggerThanTwoGigs) = 0;
protected:
Writer(std::vector<DyLibUsed>&) {};
};
};
#endif // __EXECUTABLEFILE__