aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ELFWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/ELFWriter.cpp')
-rw-r--r--lib/CodeGen/ELFWriter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp
index f4cd94a988..8cbaf6f13b 100644
--- a/lib/CodeGen/ELFWriter.cpp
+++ b/lib/CodeGen/ELFWriter.cpp
@@ -155,8 +155,10 @@ ELFSection &ELFWriter::getJumpTableSection() {
// Get a constant pool section based on the section name returned by TAI
ELFSection &ELFWriter::getConstantPoolSection(MachineConstantPoolEntry &CPE) {
+ uint64_t Size = TM.getTargetData()->getTypeAllocSize(CPE.getType());
+
std::string CstPoolName =
- TAI->SelectSectionForMachineConst(CPE.getType())->getName();
+ TAI->getSectionForMergableConstant(Size,CPE.getRelocationInfo())->getName();
return getSection(CstPoolName,
ELFSection::SHT_PROGBITS,
ELFSection::SHF_MERGE | ELFSection::SHF_ALLOC,