blob: a78d98e8cbd95352a9e3b09a1f1653f30669ae17 [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
Brian Carlstrom700c8d32012-11-05 10:42:02 -080017#include "elf_writer.h"
18#include "os.h"
19
Ian Rogers1212a022013-03-04 10:48:41 -080020namespace art {
21class CompilerDriver;
22} // namespace art
23
24extern "C" bool WriteElf(art::CompilerDriver& driver,
Brian Carlstrom700c8d32012-11-05 10:42:02 -080025 std::vector<uint8_t>& oat_contents,
26 art::File* file) {
Ian Rogers1212a022013-03-04 10:48:41 -080027 return art::ElfWriter::Create(file, oat_contents, driver);
Brian Carlstrom700c8d32012-11-05 10:42:02 -080028}
29extern "C" bool FixupElf(art::File* file, uintptr_t oat_data_begin) {
30 return art::ElfWriter::Fixup(file, oat_data_begin);
31}
32extern "C" void GetOatElfInformation(art::File* file,
33 size_t& oat_loaded_size,
34 size_t& oat_data_offset) {
35 art::ElfWriter::GetOatElfInformation(file, oat_loaded_size, oat_data_offset);
36}