diff options
author | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2019-07-22 17:48:53 +0000 |
---|---|---|
committer | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2019-07-22 17:48:53 +0000 |
commit | 5874a28ac56dc50cee72f30b729cbc03b35f3db9 (patch) | |
tree | e6b41416e623ada3803480126d6ef308f34b1f7c /llvm/lib/MC/ELFObjectWriter.cpp | |
parent | 3f06210295051a413473e8f7d2b4a299c1f04635 (diff) | |
download | bcm5719-llvm-5874a28ac56dc50cee72f30b729cbc03b35f3db9.tar.gz bcm5719-llvm-5874a28ac56dc50cee72f30b729cbc03b35f3db9.zip |
Revert "Reland [ELF] Loose a condition for relocation with a symbol"
This reverts commit r366686 as it appears to be causing buildbot
failures on sanitizer-x86_64-linux-android and sanitizer-x86_64-linux.
llvm-svn: 366708
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/ELFObjectWriter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index e20af8de0c3..2c68723a12f 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -1396,6 +1396,11 @@ bool ELFObjectWriter::shouldRelocateWithSymbol(const MCAssembler &Asm, 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 |