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 | 175fe6839353fe3659adba11c1f2b11d3451e7dc (patch) | |
tree | 43e8cada1481e8473343968088b52275218c046b /lib/MC/MCELF.cpp | |
parent | faf4d59137e85f917f868e784c8d83ccc29c4b7f (diff) | |
download | llvm-175fe6839353fe3659adba11c1f2b11d3451e7dc.tar.gz llvm-175fe6839353fe3659adba11c1f2b11d3451e7dc.tar.bz2 llvm-175fe6839353fe3659adba11c1f2b11d3451e7dc.tar.xz |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196440 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCELF.cpp')
-rw-r--r-- | lib/MC/MCELF.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/MC/MCELF.cpp b/lib/MC/MCELF.cpp index ebb189e543..0a9cd31dda 100644 --- a/lib/MC/MCELF.cpp +++ b/lib/MC/MCELF.cpp @@ -72,13 +72,13 @@ unsigned MCELF::GetVisibility(MCSymbolData &SD) { // Other is stored in the last six bits of st_other // st_other values are stored in the second byte of get/setFlags void MCELF::setOther(MCSymbolData &SD, unsigned Other) { - uint32_t OtherFlags = SD.getFlags() & ~(0x3f << ELF_Other_Shift); - SD.setFlags(OtherFlags | (Other << ELF_Other_Shift)); + uint32_t OtherFlags = SD.getFlags() & ~(0x3f << ELF_STO_Shift); + SD.setFlags(OtherFlags | (Other << ELF_STO_Shift)); } unsigned MCELF::getOther(MCSymbolData &SD) { unsigned Other = - (SD.getFlags() & (0x3f << ELF_Other_Shift)) >> ELF_Other_Shift; + (SD.getFlags() & (0x3f << ELF_STO_Shift)) >> ELF_STO_Shift; return Other; } |