[PATCH] D62107: [ELF] Copy IsPreemptible in replaceSymbol()
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 19 09:08:53 PDT 2019
MaskRay created this revision.
MaskRay added reviewers: grimar, ruiu.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
Otherwise, we may set IsPreemptible (e.g. --dynamic-list) then clear it
(in replaceCommonSymbols()).
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D62107
Files:
ELF/Symbols.h
test/ELF/dynamic-list-preempt-replace-symbol.s
Index: test/ELF/dynamic-list-preempt-replace-symbol.s
===================================================================
--- /dev/null
+++ test/ELF/dynamic-list-preempt-replace-symbol.s
@@ -0,0 +1,14 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
+# RUN: echo '{ common; };' > %t.list
+# RUN: ld.lld --dynamic-list %t.list -shared %t.o -o %t.so
+
+# RUN: llvm-readobj -r %t.so | FileCheck %s
+
+# CHECK: R_X86_64_GLOB_DAT common 0x0
+
+movq common at gotpcrel(%rip), %rax
+
+.type common, at object
+.comm common,4,4
Index: ELF/Symbols.h
===================================================================
--- ELF/Symbols.h
+++ ELF/Symbols.h
@@ -473,6 +473,7 @@
Sym->ExportDynamic = Old.ExportDynamic;
Sym->CanInline = Old.CanInline;
Sym->Traced = Old.Traced;
+ Sym->IsPreemptible = Old.IsPreemptible;
Sym->ScriptDefined = Old.ScriptDefined;
// Print out a log message if --trace-symbol was specified.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62107.200182.patch
Type: text/x-patch
Size: 946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190519/7444f2d9/attachment.bin>
More information about the llvm-commits
mailing list