XFAIL this completely at the moment:
[oota-llvm.git] / lib / MC / ELFObjectWriter.cpp
index d8f03fcc58d839e1690a14991a9ad6864fb78710..e9b8fe296581653634dee752e40df897672ddf29 100644 (file)
@@ -796,6 +796,11 @@ bool ELFObjectWriter::shouldRelocateWithSymbol(const MCSymbolRefExpr *RefA,
   if (Flags & ELF::SHF_MERGE) {
     if (C != 0)
       return true;
+
+    // It looks like gold has a bug (http://sourceware.org/PR16794) and can
+    // only handle section relocations to mergeable sections if using RELA.
+    if (!hasRelocationAddend())
+      return true;
   }
 
   // Most TLS relocations use a got, so they need the symbol. Even those that