================
@@ -0,0 +1,350 @@
+//===-- ReExportedSymbolTest.cpp 
------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
+#include "Plugins/Platform/Linux/PlatformLinux.h"
+#include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h"
+#include "TestingSupport/SubsystemRAII.h"
+#include "TestingSupport/TestUtilities.h"
+#include "lldb/Core/Debugger.h"
+#include "lldb/Core/Module.h"
+#include "lldb/Core/ModuleSpec.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Symbol/ObjectFile.h"
+#include "lldb/Symbol/Symbol.h"
+#include "lldb/Symbol/Symtab.h"
+#include "lldb/Target/Platform.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
+#include "llvm/Testing/Support/Error.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+using namespace lldb;
+
+namespace {
+class ReExportedSymbolTest : public testing::Test {
+  SubsystemRAII<FileSystem, HostInfo, ObjectFileELF, SymbolFileSymtab,
+                platform_linux::PlatformLinux>
+      subsystems;
+};
+} // namespace
+
+// An ELF filter library naming two auxiliary filtees.  Its zero-sized
+// exported functions "foo", "bar" and "open@@FBSD_1.0" are placeholders the
+// dynamic linker resolves through the filtees.  ObjectFileELF leaves them as
+// plain code symbols (re-export marking would clobber their address ranges);
+// Symbol::ResolveReExportedSymbol shadows them at resolution time.  "bar" is
+// defined by the first filtee, "foo" only by the second, so resolving "foo"
----------------
DavidSpickett wrote:

After reading the test cases, I do think you need one where the symbol is found 
in the first filtee and exists in the second but is ignored because the first 
result wins. Assuming you have a way to tell the difference between those 
results that is.

https://github.com/llvm/llvm-project/pull/208905
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to