]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
powerpc/85xx: fix NAND boot linker scripts for -fpic
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc85xx / u-boot-nand_spl.lds
index 852f9aa4a392038212175544ecb017fca3ed2087..668158f7029ceae7d43666bd2e448c37d02c6c09 100644 (file)
@@ -37,10 +37,12 @@ SECTIONS
        .reloc : {
                _GOT2_TABLE_ = .;
                KEEP(*(.got2))
+               KEEP(*(.got))
+               PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
                _FIXUP_TABLE_ = .;
                KEEP(*(.fixup))
        }
-       __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
+       __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
        __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
        . = ALIGN(8);