diff options
author | Fangrui Song <maskray@google.com> | 2019-05-10 17:09:25 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-05-10 17:09:25 +0000 |
commit | 9529c563eb54e0937d6945e142a693d03b4b6893 (patch) | |
tree | 48584c637632a083ac7fdab21e5affaa1e913c1b /llvm/lib/MC/ELFObjectWriter.cpp | |
parent | c396f09ce96e56260cc7d5d3398615904b473265 (diff) | |
download | bcm5719-llvm-9529c563eb54e0937d6945e142a693d03b4b6893.tar.gz bcm5719-llvm-9529c563eb54e0937d6945e142a693d03b4b6893.zip |
[MC][ELF] Copy top 3 bits of st_other to .symver aliases
On PowerPC64 ELFv2 ABI, the top 3 bits of st_other encode the local
entry offset. A versioned symbol alias created by .symver should copy
the bits from the source symbol.
This partly fixes PR41048. A full fix needs tracking of .set assignments
and updating st_other fields when finish() is called, see D56586.
Patch by Alfredo Dal'Ava JĂșnior
Differential Revision: https://reviews.llvm.org/D59436
llvm-svn: 360442
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/ELFObjectWriter.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index 96bbc2ee630..95b0e274526 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -1279,6 +1279,7 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssembler &Asm, // This is the first place we are able to copy this information. Alias->setExternal(Symbol.isExternal()); Alias->setBinding(Symbol.getBinding()); + Alias->setOther(Symbol.getOther()); if (!Symbol.isUndefined() && !Rest.startswith("@@@")) continue; |