aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
authorNikola Prica <nikola.prica@rt-rk.com>2019-07-10 11:17:48 +0000
committerNikola Prica <nikola.prica@rt-rk.com>2019-07-10 11:17:48 +0000
commitfb163b4b207c832431a16840161a7528a6137322 (patch)
treeb2d9914c2b1f6acdb817bdfd4ee95d9b5ca8d819 /llvm/lib/MC/ELFObjectWriter.cpp
parent110f97632e119d289e4bd9b5c01f0a300b8d2185 (diff)
downloadllvm-fb163b4b207c832431a16840161a7528a6137322.zip
llvm-fb163b4b207c832431a16840161a7528a6137322.tar.gz
llvm-fb163b4b207c832431a16840161a7528a6137322.tar.bz2
[ELF] Loose a condition for relocation with a symbol
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: 365618
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 2c68723..e20af8d 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