blob: 1fd8a94926ecd623529b1beec6935e147e255cdc [file] [log] [blame]
Brian Carlstrom700c8d32012-11-05 10:42:02 -08001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "compiler.h"
18#include "elf_writer.h"
19#include "os.h"
20
21extern "C" bool WriteElf(art::Compiler& compiler,
22 std::vector<uint8_t>& oat_contents,
23 art::File* file) {
24 return art::ElfWriter::Create(file, oat_contents, compiler);
25}
26extern "C" bool FixupElf(art::File* file, uintptr_t oat_data_begin) {
27 return art::ElfWriter::Fixup(file, oat_data_begin);
28}
29extern "C" void GetOatElfInformation(art::File* file,
30 size_t& oat_loaded_size,
31 size_t& oat_data_offset) {
32 art::ElfWriter::GetOatElfInformation(file, oat_loaded_size, oat_data_offset);
33}