diff options
author | Armando Montanez <amontanez@google.com> | 2018-12-03 19:30:52 +0000 |
---|---|---|
committer | Armando Montanez <amontanez@google.com> | 2018-12-03 19:30:52 +0000 |
commit | 1e4b3709bb7d8a67a3382bf1e72364b0a9bd7429 (patch) | |
tree | f7b20de517b562360b7669b670e156d1dbc7875d /llvm/lib/TextAPI/ELF/ELFStub.cpp | |
parent | 00f1d76738a50374019a47d30d09ee1829fe4a65 (diff) | |
download | bcm5719-llvm-1e4b3709bb7d8a67a3382bf1e72364b0a9bd7429.tar.gz bcm5719-llvm-1e4b3709bb7d8a67a3382bf1e72364b0a9bd7429.zip |
[llvm-tapi] initial commit, supports ELF text stubs
http://lists.llvm.org/pipermail/llvm-dev/2018-September/126472.html
TextAPI is a library and accompanying tool that allows conversion between binary shared object stubs and textual counterparts. The motivations and uses cases for this are explained thoroughly in the llvm-dev proposal [1]. This initial commit proposes a potential structure for the TAPI library, also including support for reading/writing text-based ELF stubs (.tbe) in addition to preliminary support for reading binary ELF files. The goal for this patch is to ensure the project architecture appropriately welcomes integration of Mach-O stubbing from Apple's TAPI [2].
Added:
- TextAPI library
- .tbe read support
- .tbe write (to raw_ostream) support
[1] http://lists.llvm.org/pipermail/llvm-dev/2018-September/126472.html
[2] https://github.com/ributzka/tapi
Differential Revision: https://reviews.llvm.org/D53051
llvm-svn: 348170
Diffstat (limited to 'llvm/lib/TextAPI/ELF/ELFStub.cpp')
-rw-r--r-- | llvm/lib/TextAPI/ELF/ELFStub.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/llvm/lib/TextAPI/ELF/ELFStub.cpp b/llvm/lib/TextAPI/ELF/ELFStub.cpp new file mode 100644 index 00000000000..248a078a240 --- /dev/null +++ b/llvm/lib/TextAPI/ELF/ELFStub.cpp @@ -0,0 +1,29 @@ +//===- ELFStub.cpp --------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===-----------------------------------------------------------------------===/ + +#include "llvm/TextAPI/ELF/ELFStub.h" + +using namespace llvm; +using namespace llvm::elfabi; + +ELFStub::ELFStub(ELFStub const &Stub) { + TbeVersion = Stub.TbeVersion; + Arch = Stub.Arch; + SoName = Stub.SoName; + NeededLibs = Stub.NeededLibs; + Symbols = Stub.Symbols; +} + +ELFStub::ELFStub(ELFStub &&Stub) { + TbeVersion = std::move(Stub.TbeVersion); + Arch = std::move(Stub.Arch); + SoName = std::move(Stub.SoName); + NeededLibs = std::move(Stub.NeededLibs); + Symbols = std::move(Stub.Symbols); +} |