Centralize handling of ELF_Other_ThumbFunc.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206988 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2014-04-23 14:42:32 +00:00
parent da2d85cfc8
commit 5473dc7ce0

View File

@ -513,7 +513,8 @@ uint64_t ELFObjectWriter::SymbolValue(MCSymbolData &OrigData,
}
}
if (Data && Data->getFlags() & ELF_Other_ThumbFunc)
if ((Data && Data->getFlags() & ELF_Other_ThumbFunc) ||
OrigData.getFlags() & ELF_Other_ThumbFunc)
Res |= 1;
if (!Symbol || !Symbol->isInSection())
@ -644,8 +645,6 @@ void ELFObjectWriter::WriteSymbol(SymbolTableWriter &Writer, ELFSymbolData &MSD,
Other |= Visibility;
uint64_t Value = SymbolValue(OrigData, Layout);
if (OrigData.getFlags() & ELF_Other_ThumbFunc)
Value |= 1;
uint64_t Size = 0;
const MCExpr *ESize = OrigData.getSize();