blob: 97f0d68f4d4fbcad76511d2847e0058dc7e97a7c [file] [log] [blame]
Armando Montanez31f0f652019-01-03 18:32:36 +00001//===- ELFObjHandler.h ------------------------------------------*- C++ -*-===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Armando Montanez31f0f652019-01-03 18:32:36 +00006//
7//===-----------------------------------------------------------------------===/
8///
9/// This supports reading and writing of elf dynamic shared objects.
10///
11//===-----------------------------------------------------------------------===/
12
13#ifndef LLVM_TOOLS_ELFABI_ELFOBJHANDLER_H
14#define LLVM_TOOLS_ELFABI_ELFOBJHANDLER_H
15
16#include "llvm/Object/ELFObjectFile.h"
17#include "llvm/Object/ELFTypes.h"
18#include "llvm/TextAPI/ELF/ELFStub.h"
19
20namespace llvm {
21
22class MemoryBuffer;
23
24namespace elfabi {
25
26/// Attempt to read a binary ELF file from a MemoryBuffer.
27Expected<std::unique_ptr<ELFStub>> readELFFile(MemoryBufferRef Buf);
28
29} // end namespace elfabi
30} // end namespace llvm
31
32#endif // LLVM_TOOLS_ELFABI_ELFOBJHANDLER_H