u-boot/mpc85xx/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_ definition
PATCH 1/1 u-boot/mpc85xx/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_ definition
From: Zhenhua Luo <[email protected]>
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
--- arch/powerpc/cpu/mpc85xx/u-boot-nand.lds | 1 - arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds | 1 - arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 1 - arch/powerpc/cpu/mpc85xx/u-boot.lds | 1 - 4 files changed, 4 deletions(-)
arch/powerpc/cpu/mpc85xx/u-boot-nand.lds +0 -1
@@ -44,7 +44,6 @@ SECTIONS _GOT2_TABLE_ = .; KEEP(*(.got2)) KEEP(*(.got)) - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); _FIXUP_TABLE_ = .; KEEP(*(.fixup)) }
arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds +0 -1
@@ -22,7 +22,6 @@ SECTIONS _GOT2_TABLE_ = .; KEEP(*(.got2)) KEEP(*(.got)) - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); _FIXUP_TABLE_ = .; KEEP(*(.fixup)) }
arch/powerpc/cpu/mpc85xx/u-boot-spl.lds +0 -1
@@ -29,7 +29,6 @@ SECTIONS _GOT2_TABLE_ = .; KEEP(*(.got2)) KEEP(*(.got)) - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); _FIXUP_TABLE_ = .; KEEP(*(.fixup)) }
arch/powerpc/cpu/mpc85xx/u-boot.lds +0 -1
@@ -50,7 +50,6 @@ SECTIONS _GOT2_TABLE_ = .; KEEP(*(.got2)) KEEP(*(.got)) - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); _FIXUP_TABLE_ = .; KEEP(*(.fixup)) }
Signature · 1 line
1.9.1
PATCH 1/1 u-boot/mpc85xx/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_ definition
Quoted 11 lines · Prabhakar Kushwaha
From: Zhenhua Luo <[email protected]>
In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in
u-boot.ldsoverrides 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).
Quoted 5 lines
Fixed the following build errors with binutils-2.25:
| powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in linker created .gotSigned-off-by Zhenhua Luo <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>
What happens when we use older binutils? I'd like some run-time testing too please :) Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151025/074b488b/attachment.sig>
PATCH 1/1 u-boot/mpc85xx/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_ definition
Hi Tom,
Quoted 25 lines
-----Original Message-----
From: Tom Rini [mailto:trini at konsulko.com]
Sent: Sunday, October 25, 2015 9:46 PM
To: Kushwaha Prabhakar-B32579 <[email protected]>
Cc: u-boot at lists.denx.de; Sun York-R58495 <[email protected]>; Luo Zhenhua-B19537 <[email protected]>
Subject: Re: [U-Boot] [PATCH]u-boot/mpc85xx/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_ definitionQuoted 7 lines · Prabhakar Kushwaha
From: Zhenhua Luo <[email protected]>
In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in
u-boot.ldsoverrides 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 intothe .reloc section.
Quoted 4 lines
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).
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Fixed the following build errors with binutils-2.25:
| powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined | in linker created .gotSigned-off-by Zhenhua Luo <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>What happens when we use older binutils?
[Luo Zhenhua-B19537] I verified the u-boot build for p4080ds(e500v2) with binutils-2.23.2, the build passed.
I'd like some run-time testing too please :) Thanks!
[Luo Zhenhua-B19537] I did sanity test for the u-boot on p4080ds, it works normally.
The log files are attached.
Best Regards,
Zhenhua
Quoted 1 line
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot.log
Type: application/octet-stream
Size: 6686 bytes
Desc: u-boot.log
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151103/c66c6374/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot-build.log
Type: application/octet-stream
Size: 15547 bytes
Desc: u-boot-build.log
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151103/c66c6374/attachment-0001.obj>