Remove big-endianness from =<fillexp> code.

llvm-svn: 300005
This commit is contained in:
Rui Ueyama
2017-04-11 22:45:57 +00:00
parent 8f8c2f9599
commit b58079d4e2
2 changed files with 12 additions and 11 deletions

View File

@@ -36,6 +36,7 @@
using namespace llvm;
using namespace llvm::ELF;
using namespace llvm::support::endian;
using namespace lld;
using namespace lld::elf;
@@ -637,11 +638,13 @@ ScriptParser::readOutputSectionDescription(StringRef OutSec) {
// as 32-bit big-endian values. We will do the same as ld.gold does
// because it's simpler than what ld.bfd does.
uint32_t ScriptParser::readOutputSectionFiller(StringRef Tok) {
uint32_t V;
if (!Tok.getAsInteger(0, V))
return V;
setError("invalid filler expression: " + Tok);
return 0;
uint32_t V = 0;
if (Tok.getAsInteger(0, V))
setError("invalid filler expression: " + Tok);
uint32_t Buf;
write32be(&Buf, V);
return Buf;
}
SymbolAssignment *ScriptParser::readProvideHidden(bool Provide, bool Hidden) {