Support adding relocations for data sections, handling the cases where
global declared symbols are initialized with references from other global
symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76540 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/ELFWriter.h b/lib/CodeGen/ELFWriter.h
index 34f8276..6f083b92 100644
--- a/lib/CodeGen/ELFWriter.h
+++ b/lib/CodeGen/ELFWriter.h
@@ -211,6 +211,11 @@
     unsigned getGlobalELFVisibility(const GlobalValue *GV);
     unsigned getElfSectionFlags(unsigned Flags);
 
+    // setGlobalSymLookup - Set global value 'GV' with 'Index' in the lookup map
+    void setGlobalSymLookup(const GlobalValue *GV, unsigned Index) {
+      GblSymLookup[GV] = Index;
+    }
+
     // As we complete the ELF file, we need to update fields in the ELF header
     // (e.g. the location of the section table).  These members keep track of
     // the offset in ELFHeader of these various pieces to update and other