| Index: src/IceELFObjectWriter.cpp
|
| diff --git a/src/IceELFObjectWriter.cpp b/src/IceELFObjectWriter.cpp
|
| index e263c687869922b9b84776ce3a650a4053f33673..874b36a72db82c8283595d308450a7562df4a919 100644
|
| --- a/src/IceELFObjectWriter.cpp
|
| +++ b/src/IceELFObjectWriter.cpp
|
| @@ -490,12 +490,11 @@ template <typename ConstType> void ELFObjectWriter::writeConstantPool(Type Ty) {
|
| size_t EntSize = typeWidthInBytes(Ty);
|
| char Buf[20];
|
| SizeT WriteAmt = std::min(EntSize, llvm::array_lengthof(Buf));
|
| + // Check that we write the full PrimType.
|
| assert(WriteAmt == EntSize);
|
| // Assume that writing WriteAmt bytes at a time allows us to avoid aligning
|
| // between entries.
|
| assert(WriteAmt % Align == 0);
|
| - // Check that we write the full PrimType.
|
| - assert(WriteAmt == sizeof(typename ConstType::PrimType));
|
| const Elf64_Xword ShFlags = SHF_ALLOC | SHF_MERGE;
|
| std::string SecBuffer;
|
| llvm::raw_string_ostream SecStrBuf(SecBuffer);
|
| @@ -511,6 +510,8 @@ template <typename ConstType> void ELFObjectWriter::writeConstantPool(Type Ty) {
|
|
|
| // Write the data.
|
| for (Constant *C : Pool) {
|
| + if (!C->getShouldBePooled())
|
| + continue;
|
| auto Const = llvm::cast<ConstType>(C);
|
| std::string SymBuffer;
|
| llvm::raw_string_ostream SymStrBuf(SymBuffer);
|
| @@ -536,6 +537,8 @@ template void ELFObjectWriter::writeConstantPool<ConstantFloat>(Type Ty);
|
|
|
| template void ELFObjectWriter::writeConstantPool<ConstantDouble>(Type Ty);
|
|
|
| +template void ELFObjectWriter::writeConstantPool<ConstantInteger32>(Type Ty);
|
| +
|
| void ELFObjectWriter::writeAllRelocationSections() {
|
| writeRelocationSections(RelTextSections);
|
| writeRelocationSections(RelDataSections);
|
|
|