#ifndef COMPONENTS_NACL_LOADER_NONSFI_ELF_LOADER_H_
#define COMPONENTS_NACL_LOADER_NONSFI_ELF_LOADER_H_
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "native_client/src/include/portability.h"
#include "native_client/src/trusted/service_runtime/nacl_error_code.h"
#if !defined(OS_LINUX)
#error Non SFI mode is currently supported only on linux.
#endif
struct NaClDesc;
namespace nacl {
namespace nonsfi {
class ElfImage {
public:
ElfImage();
~ElfImage();
uintptr_t entry_point() const;
NaClErrorCode Read(struct NaClDesc* descriptor);
NaClErrorCode Load(struct NaClDesc* descriptor);
private:
struct Data;
::scoped_ptr<Data> data_;
DISALLOW_COPY_AND_ASSIGN(ElfImage);
};
}
}
#endif