diff options
author | Logan Chien <tzuhsiang.chien@gmail.com> | 2013-12-05 00:34:11 +0000 |
---|---|---|
committer | Logan Chien <tzuhsiang.chien@gmail.com> | 2013-12-05 00:34:11 +0000 |
commit | ee36595ce6fcf2046bf48f762cea3eadba480d00 (patch) | |
tree | 481a0b24fd18cc96bdf8aa006fd3b3c528d47daf /llvm/lib/MC/ELFObjectWriter.cpp | |
parent | b53a85a6f833f49f3781229163720ec38f4a4df2 (diff) | |
download | llvm-ee36595ce6fcf2046bf48f762cea3eadba480d00.zip llvm-ee36595ce6fcf2046bf48f762cea3eadba480d00.tar.gz llvm-ee36595ce6fcf2046bf48f762cea3eadba480d00.tar.bz2 |
[mc] Fix ELF st_other flag.
ELF_Other_Weakref and ELF_Other_ThumbFunc seems to be LLVM
internal ELF symbol flags. These should not be emitted to
object file.
This commit defines ELF_STO_Shift for the target-defined
flags for st_other, and increase the value of
ELF_Other_Shift to 16.
llvm-svn: 196440
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/ELFObjectWriter.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index 9899bb2..972c64c 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -551,8 +551,7 @@ void ELFObjectWriter::WriteSymbol(MCDataFragment *SymtabF, // Other and Visibility share the same byte with Visibility using the lower // 2 bits uint8_t Visibility = MCELF::GetVisibility(OrigData); - uint8_t Other = MCELF::getOther(OrigData) << - (ELF_Other_Shift - ELF_STV_Shift); + uint8_t Other = MCELF::getOther(OrigData) << (ELF_STO_Shift - ELF_STV_Shift); Other |= Visibility; uint64_t Value = SymbolValue(Data, Layout); |