]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/cpu/mpc824x/start.S
PowerPC: Add support for -msingle-pic-base
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc824x / start.S
index fc4e922d633d15d2f09626223265189fe62cbc24..cc988759e0ae02b2c35eebded59db08a9a24e39c 100644 (file)
@@ -183,7 +183,11 @@ in_flash:
        /*----------------------------------------------------------------------*/
 
        GET_GOT                 /* initialize GOT access                        */
-
+#if defined(__pic__) && __pic__ == 1
+       /* Needed for upcoming -msingle-pic-base */
+       bl      _GLOBAL_OFFSET_TABLE_@local-4
+       mflr    r30
+#endif
        /* r3: IMMR */
        bl      cpu_init_f      /* run low-level CPU init code     (from Flash) */
 
@@ -452,6 +456,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  */
 #ifdef CONFIG_SYS_RAMBOOT
        lis     r4, CONFIG_SYS_SDRAM_BASE@h             /* Source      Address  */