Added initial support for small sections on Mips.
Added gp_rel relocations to support addressing small section contents.
Added command line to specify small section threshold in bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53869 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/Mips/MipsISelLowering.h b/lib/Target/Mips/MipsISelLowering.h
index 7025334..3a1fd75 100644
--- a/lib/Target/Mips/MipsISelLowering.h
+++ b/lib/Target/Mips/MipsISelLowering.h
@@ -37,6 +37,9 @@
       // No relation with Mips Lo register
       Lo, 
 
+      // Handle gp_rel (small data/bss sections) relocation.
+      GPRel,
+
       // Select CC Pseudo Instruction
       SelectCC,
 
@@ -83,7 +86,7 @@
     SDOperand LowerCCCCallTo(SDOperand Op, SelectionDAG &DAG, unsigned CC);
     SDNode *LowerCallResult(SDOperand Chain, SDOperand InFlag, SDNode*TheCall,
                             unsigned CallingConv, SelectionDAG &DAG);
-    SDOperand getReturnAddressFrameIndex(SelectionDAG &DAG);
+    bool IsGlobalInSmallSection(GlobalValue *GV); 
 
     // Lower Operand specifics
     SDOperand LowerRET(SDOperand Op, SelectionDAG &DAG);