]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mpc85xx/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_ definition
authorZhenhua Luo <zhenhua.luo@freescale.com>
Sun, 25 Oct 2015 05:02:28 +0000 (10:32 +0530)
committerTom Rini <trini@konsulko.com>
Mon, 9 Nov 2015 23:21:06 +0000 (23:21 +0000)
In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in
u-boot.lds overrides the linker built-in symbols
(https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;
h=b893397a4b1316610f49819344817715e4305de9),
so the linker is treating _GLOBAL_OFFSET_TABLE_ as a definition into the
.reloc section.

To align with the change of binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbol
should not be defined in sections, and the symbols in linker generated .got
section should be used(https://sourceware.org/ml/binutils/2008-09/
msg00122.html)

Fixed the following build errors with binutils-2.25:
| powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in
linker created .got

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
arch/powerpc/cpu/mpc85xx/u-boot.lds

index f933b219449411b2b68fc1ccb93ab8b2a310925a..0399f93e6ef04aade2fa91a7379cb13a0c5e5689 100644 (file)
@@ -44,7 +44,6 @@ SECTIONS
     _GOT2_TABLE_ = .;
     KEEP(*(.got2))
     KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
     _FIXUP_TABLE_ = .;
     KEEP(*(.fixup))
   }
index b83c55388cf2f49f8cdfc24ce5469e20d43487f0..f04456442cb7c7cb105455460e882e160cf3e414 100644 (file)
@@ -22,7 +22,6 @@ SECTIONS
                _GOT2_TABLE_ = .;
                KEEP(*(.got2))
                KEEP(*(.got))
-               PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
                _FIXUP_TABLE_ = .;
                KEEP(*(.fixup))
        }
index 5ae7b3eedbc989b9d5636b27b70360ada39a70c3..889a4c24001a6faca7a2684ad9c0aface6f59172 100644 (file)
@@ -29,7 +29,6 @@ SECTIONS
                _GOT2_TABLE_ = .;
                KEEP(*(.got2))
                KEEP(*(.got))
-               PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
                _FIXUP_TABLE_ = .;
                KEEP(*(.fixup))
        }
index 2cf0b2595251ee755b47389eb48624062f3a766f..f15eaf38052caece83515d468cb2d6eed68eca2d 100644 (file)
@@ -50,7 +50,6 @@ SECTIONS
     _GOT2_TABLE_ = .;
     KEEP(*(.got2))
     KEEP(*(.got))
-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
     _FIXUP_TABLE_ = .;
     KEEP(*(.fixup))
   }