Start adding support for static programs using dynamic libraries.
This is just enough for a hello world using a dynamic glibc.
llvm-svn: 248854
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index f1dfd66..3625934 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -234,12 +234,12 @@
if (!Body)
continue;
uint32_t Type = RI.getType(IsMips64EL);
- if (Target->relocNeedsPlt(Type)) {
+ if (Target->relocNeedsPlt(Type, *Body)) {
if (Body->isInPlt())
continue;
PltSec.addEntry(Body);
}
- if (Target->relocNeedsGot(Type)) {
+ if (Target->relocNeedsGot(Type, *Body)) {
if (Body->isInGot())
continue;
GotSec.addEntry(Body);