Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2013 The Chromium Authors. All rights reserved. | |
| 3 * Use of this source code is governed by a BSD-style license that can be | |
| 4 * found in the LICENSE file. | |
| 5 */ | |
| 6 | |
| 7 #ifndef COMPONENTS_NACL_LOADER_BARE_METAL_ELF_UTIL_H_ | |
| 8 #define COMPONENTS_NACL_LOADER_BARE_METAL_ELF_UTIL_H_ | |
| 9 | |
| 10 #include "build/build_config.h" | |
| 11 | |
| 12 /* | |
| 13 * This module provides utilities for ELF binary. Temporarily forked from | |
| 14 * native_client/src/trusted/service_runtime/elf_util.{h,c}. | |
| 15 * TODO(hidehiko): Unify with it after Bare Metal Mode gets stable. | |
|
Mark Seaborn
2013/12/06 03:21:16
I should say now that I am not expecting such a un
hidehiko
2013/12/06 17:40:02
I see. Done. Let's revisit here, when we move the
| |
| 16 */ | |
| 17 | |
| 18 #ifndef OS_LINUX | |
| 19 #error Bare Metal is currently supported only on linux. | |
| 20 #endif | |
| 21 | |
| 22 #include "components/nacl/loader/bare_metal/bare_metal_error_code.h" | |
| 23 #include "native_client/src/include/portability.h" | |
| 24 | |
| 25 struct NaClBareMetalElfImage; | |
| 26 struct NaClDesc; | |
| 27 | |
| 28 /* | |
| 29 * Reads the ELF file from the descriptor, and creates an image instance. | |
| 30 */ | |
| 31 struct NaClBareMetalElfImage *NaClBareMetalElfImageNew( | |
| 32 struct NaClDesc *descriptor, | |
| 33 NaClBareMetalErrorCode *error_code); | |
| 34 | |
| 35 /* | |
| 36 * Releases the image instance allocated by NaClBareMetalElfImageNew declared | |
| 37 * above. | |
| 38 */ | |
| 39 void NaClBareMetalElfImageDelete(struct NaClBareMetalElfImage *image); | |
| 40 | |
| 41 /* | |
| 42 * Returns the entry point address of the given ELF image. | |
| 43 */ | |
| 44 uintptr_t NaClBareMetalElfImageGetEntryPoint( | |
| 45 struct NaClBareMetalElfImage *image); | |
| 46 | |
| 47 /* | |
| 48 * Loads an ELF executable for Bare Metal nacl. | |
| 49 */ | |
| 50 NaClBareMetalErrorCode NaClBareMetalElfImageLoad( | |
| 51 struct NaClBareMetalElfImage *image, | |
| 52 struct NaClDesc *descriptor); | |
| 53 | |
| 54 #endif /* COMPONENTS_NACL_LOADER_BARE_METAL_ELF_UTIL_H_ */ | |
| OLD | NEW |