Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: components/nacl/loader/nonsfi/elf_loader.h

Issue 100373005: Initial implementation of Bare Metal Mode for NaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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.
4
5 #ifndef COMPONENTS_NACL_LOADER_NONSFI_ELF_LOADER_H_
6 #define COMPONENTS_NACL_LOADER_NONSFI_ELF_LOADER_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/nacl/loader/nonsfi/nonsfi_error_code.h"
11 #include "native_client/src/include/portability.h"
12
13 #if !defined(OS_LINUX)
14 #error Non SFI mode is currently supported only on linux.
15 #endif
16
17 struct NaClDesc;
18
19 namespace nacl {
20 namespace nonsfi {
21
22 class ElfImage {
23 public:
24 ElfImage();
25 ~ElfImage();
26
27 // Available only after Load() is called.
28 uintptr_t entry_point() const;
29
30 // Reads the ELF file from the descriptor and stores the header information
31 // into this instance.
32 NonSfiErrorCode Read(struct NaClDesc* descriptor);
33
34 // Loads the ELF executable to the memory.
35 NonSfiErrorCode Load(struct NaClDesc* descriptor);
36
37 private:
38 struct Data;
39 ::scoped_ptr<Data> data_;
40
41 DISALLOW_COPY_AND_ASSIGN(ElfImage);
42 };
43
44 } // namespace nonsfi
45 } // namespace nacl
46
47 #endif // COMPONENTS_NACL_LOADER_NONSFI_ELF_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698