1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_NACL_LOADER_NONSFI_ELF_LOADER_H_
6 #define COMPONENTS_NACL_LOADER_NONSFI_ELF_LOADER_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "native_client/src/include/portability.h"
11 #include "native_client/src/trusted/service_runtime/nacl_error_code.h"
13 #if !defined(OS_LINUX)
14 #error Non SFI mode is currently supported only on linux.
27 // Available only after Load() is called.
28 uintptr_t entry_point() const;
30 // Reads the ELF file from the descriptor and stores the header information
31 // into this instance.
32 NaClErrorCode
Read(struct NaClDesc
* descriptor
);
34 // Loads the ELF executable to the memory.
35 NaClErrorCode
Load(struct NaClDesc
* descriptor
);
39 ::scoped_ptr
<Data
> data_
;
41 DISALLOW_COPY_AND_ASSIGN(ElfImage
);
47 #endif // COMPONENTS_NACL_LOADER_NONSFI_ELF_LOADER_H_