]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/cpu/mpc85xx/start.S
PowerPC: Add support for -msingle-pic-base
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc85xx / start.S
index 57774933a3dbe5819d0118336444551aa5c15173..36233578f73629094574d925ce79d7e498966861 100644 (file)
@@ -421,6 +421,11 @@ _start_cont:
        stw     r0,+12(r1)              /* Save return addr (underflow vect) */
 
        GET_GOT
+#if defined(__pic__) && __pic__ == 1
+       /* Needed for upcoming -msingle-pic-base */
+       bl      _GLOBAL_OFFSET_TABLE_@local-4
+       mflr    r30
+#endif
        bl      cpu_init_early_f
 
        /* switch back to AS = 0 */
@@ -921,6 +926,11 @@ relocate_code:
        mr      r10,r5          /* Save copy of Destination Address     */
 
        GET_GOT
+#if defined(__pic__) && __pic__ == 1
+       /* Needed for upcoming -msingle-pic-base */
+       bl      _GLOBAL_OFFSET_TABLE_@local-4
+       mflr    r30
+#endif
        mr      r3,r5                           /* Destination Address  */
        lis     r4,CONFIG_SYS_MONITOR_BASE@h            /* Source      Address  */
        ori     r4,r4,CONFIG_SYS_MONITOR_BASE@l