make elf targets correctly handle constant pool entries that require relocations.

llvm-svn: 77130
diff --git a/llvm/lib/Target/ELFTargetAsmInfo.cpp b/llvm/lib/Target/ELFTargetAsmInfo.cpp
index c401109..2ba7b96 100644
--- a/llvm/lib/Target/ELFTargetAsmInfo.cpp
+++ b/llvm/lib/Target/ELFTargetAsmInfo.cpp
@@ -81,8 +81,13 @@
 const Section *
 ELFTargetAsmInfo::getSectionForMergableConstant(uint64_t Size,
                                                 unsigned ReloInfo) const {
-  // FIXME: IF this global requires a relocation, can we really put it in
-  // rodata???  This should check ReloInfo like darwin.
+  // If this constant pool entry has relocations, stick it into a relocatable
+  // section.
+  if (ReloInfo == 2)
+    return DataRelROSection;
+  if (ReloInfo == 1)
+    return DataRelROLocalSection;
+  
   
   const char *SecName = 0;
   switch (Size) {