aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/ELF/TBEHandler.cpp
diff options
context:
space:
mode:
authorArmando Montanez <amontanez@google.com>2018-12-11 01:00:16 +0000
committerArmando Montanez <amontanez@google.com>2018-12-11 01:00:16 +0000
commit6d6ff2e0d720b2b50c7a7566363d45b7706a6433 (patch)
tree715ab73920146f576c6d168141fbb4c55abb14d1 /llvm/lib/TextAPI/ELF/TBEHandler.cpp
parent21d45a2c98461634fe453f5fbcb473a801bae820 (diff)
downloadllvm-6d6ff2e0d720b2b50c7a7566363d45b7706a6433.zip
llvm-6d6ff2e0d720b2b50c7a7566363d45b7706a6433.tar.gz
llvm-6d6ff2e0d720b2b50c7a7566363d45b7706a6433.tar.bz2
[TextAPI][elfabi] Make SoName optional
This change makes DT_SONAME treated as an optional trait for ELF TextAPI stubs. This change accounts for the fact that shared objects aren't guaranteed to have a DT_SONAME entry. Tests have been updated to check for correct behavior of an optional soname. Differential Revision: https://reviews.llvm.org/D55533 llvm-svn: 348817
Diffstat (limited to 'llvm/lib/TextAPI/ELF/TBEHandler.cpp')
-rw-r--r--llvm/lib/TextAPI/ELF/TBEHandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/TextAPI/ELF/TBEHandler.cpp b/llvm/lib/TextAPI/ELF/TBEHandler.cpp
index 8eb60b59..dde9802 100644
--- a/llvm/lib/TextAPI/ELF/TBEHandler.cpp
+++ b/llvm/lib/TextAPI/ELF/TBEHandler.cpp
@@ -132,7 +132,7 @@ template <> struct MappingTraits<ELFStub> {
if (!IO.mapTag("!tapi-tbe", true))
IO.setError("Not a .tbe YAML file.");
IO.mapRequired("TbeVersion", Stub.TbeVersion);
- IO.mapRequired("SoName", Stub.SoName);
+ IO.mapOptional("SoName", Stub.SoName);
IO.mapRequired("Arch", (ELFArchMapper &)Stub.Arch);
IO.mapOptional("NeededLibs", Stub.NeededLibs);
IO.mapRequired("Symbols", Stub.Symbols);