summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
authorNikola Prica <nikola.prica@rt-rk.com>2019-07-22 13:07:01 +0000
committerNikola Prica <nikola.prica@rt-rk.com>2019-07-22 13:07:01 +0000
commit0166cff09b1b3dd916a9d6a6c4435a8e649b94dc (patch)
treec4a89e9dfc2e01a73305dc611aa343bb06769503 /llvm/lib/MC/ELFObjectWriter.cpp
parent937d0ee5d8da3717849c6329ee9c7795183cff59 (diff)
downloadbcm5719-llvm-0166cff09b1b3dd916a9d6a6c4435a8e649b94dc.tar.gz
bcm5719-llvm-0166cff09b1b3dd916a9d6a6c4435a8e649b94dc.zip
Reland [ELF] Loose a condition for relocation with a symbol
This patch was not the reason of the buildbot failure. Deleted code was introduced as a work around for a bug in the gold linker (http://sourceware.org/PR16794). Test case that was given as a reason for this part of code, the one on previous link, now works for the gold. This condition is too strict and when a code is compiled with debug info it forces generation of numerous relocations with symbol for architectures that do not have relocation addend. Reviewers: arsenm, espindola Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D64327 llvm-svn: 366686
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index 2c68723a12f..e20af8de0c3 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -1396,11 +1396,6 @@ 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
OpenPOWER on IntegriCloud