]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/arc/lib/relocate.c
arc: introduce separate section for interrupt vector table
[people/ms/u-boot.git] / arch / arc / lib / relocate.c
index 956aa1494e1649275044154c26b31de5c090ff17..5618b6ae938a2e9865c43ef3421b2973b7026fa5 100644 (file)
@@ -41,19 +41,23 @@ int do_elf_reloc_fixups(void)
                         */
                        memcpy(&val, offset_ptr_ram, sizeof(int));
 
+#ifdef __LITTLE_ENDIAN__
                        /* If location in ".text" section swap value */
                        if ((unsigned int)offset_ptr_rom <
-                           (unsigned int)&__text_end)
+                           (unsigned int)&__ivt_end)
                                val = (val << 16) | (val >> 16);
+#endif
 
                        /* Check that the target points into .text */
                        if (val >= CONFIG_SYS_TEXT_BASE && val <=
                            (unsigned int)&__bss_end) {
                                val += gd->reloc_off;
+#ifdef __LITTLE_ENDIAN__
                                /* If location in ".text" section swap value */
                                if ((unsigned int)offset_ptr_rom <
-                                   (unsigned int)&__text_end)
+                                   (unsigned int)&__ivt_end)
                                        val = (val << 16) | (val >> 16);
+#endif
                                memcpy(offset_ptr_ram, &val, sizeof(int));
                        } else {
                                debug("   %p: rom reloc %x, ram %p, value %x, limit %x\n",