[PATCH] D84788: [ELF] for symver directives, preserve the given symbol's size
Anthony Eden via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 28 12:26:49 PDT 2020
aeden created this revision.
aeden added a reviewer: MaskRay.
Herald added subscribers: llvm-commits, dmgreen, hiraditya.
Herald added a project: LLVM.
aeden requested review of this revision.
A versioned symbol alias created by .symver should copy the size from the source symbol, since it may be used by R_X86_64_COPY and the like.
https://reviews.llvm.org/D84788
Files:
llvm/lib/MC/ELFObjectWriter.cpp
Index: llvm/lib/MC/ELFObjectWriter.cpp
===================================================================
--- llvm/lib/MC/ELFObjectWriter.cpp
+++ llvm/lib/MC/ELFObjectWriter.cpp
@@ -1277,6 +1277,7 @@
Alias->setExternal(Symbol.isExternal());
Alias->setBinding(Symbol.getBinding());
Alias->setOther(Symbol.getOther());
+ Alias->setSize(Symbol.getSize());
if (!Symbol.isUndefined() && !Rest.startswith("@@@"))
continue;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84788.281325.patch
Type: text/x-patch
Size: 450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200728/3a751c30/attachment.bin>
More information about the llvm-commits
mailing list