[PATCH] D38647: ELF: Export preempted symbols even if there is a dynamic list.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 6 14:35:53 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL315114: ELF: Export preempted symbols even if there is a dynamic list. (authored by pcc).
Changed prior to commit:
https://reviews.llvm.org/D38647?vs=118078&id=118084#toc
Repository:
rL LLVM
https://reviews.llvm.org/D38647
Files:
lld/trunk/ELF/Driver.cpp
lld/trunk/ELF/SymbolTable.cpp
lld/trunk/test/ELF/gc-sections-shared.s
Index: lld/trunk/test/ELF/gc-sections-shared.s
===================================================================
--- lld/trunk/test/ELF/gc-sections-shared.s
+++ lld/trunk/test/ELF/gc-sections-shared.s
@@ -19,6 +19,15 @@
# CHECK-NEXT: Section: Undefined (0x0)
# CHECK-NEXT: }
# CHECK-NEXT: Symbol {
+# CHECK-NEXT: Name: bar
+# CHECK-NEXT: Value:
+# CHECK-NEXT: Size:
+# CHECK-NEXT: Binding: Global
+# CHECK-NEXT: Type:
+# CHECK-NEXT: Other:
+# CHECK-NEXT: Section: .text
+# CHECK-NEXT: }
+# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: bar2
# CHECK-NEXT: Value:
# CHECK-NEXT: Size:
Index: lld/trunk/ELF/Driver.cpp
===================================================================
--- lld/trunk/ELF/Driver.cpp
+++ lld/trunk/ELF/Driver.cpp
@@ -790,18 +790,8 @@
readDynamicList(*Buffer);
for (auto *Arg : Args.filtered(OPT_export_dynamic_symbol))
- Config->VersionScriptGlobals.push_back(
+ Config->DynamicList.push_back(
{Arg->getValue(), /*IsExternCpp*/ false, /*HasWildcard*/ false});
-
- // Dynamic lists are a simplified linker script that doesn't need the
- // "global:" and implicitly ends with a "local:*". Set the variables
- // needed to simulate that.
- if (Args.hasArg(OPT_dynamic_list) ||
- Args.hasArg(OPT_export_dynamic_symbol)) {
- Config->ExportDynamic = true;
- if (!Config->Shared)
- Config->DefaultSymbolVersion = VER_NDX_LOCAL;
- }
}
if (auto *Arg = Args.getLastArg(OPT_version_script))
Index: lld/trunk/ELF/SymbolTable.cpp
===================================================================
--- lld/trunk/ELF/SymbolTable.cpp
+++ lld/trunk/ELF/SymbolTable.cpp
@@ -733,7 +733,7 @@
for (SymbolBody *B : Syms) {
if (!Config->Shared)
- B->symbol()->VersionId = VER_NDX_GLOBAL;
+ B->symbol()->ExportDynamic = true;
else if (B->symbol()->includeInDynsym())
B->IsPreemptible = true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38647.118084.patch
Type: text/x-patch
Size: 1986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171006/15316f21/attachment.bin>
More information about the llvm-commits
mailing list