mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-09 03:58:18 -04:00
powerpc/85xx: fix NAND boot linker scripts for -fpic
GOT is now handled the way the main u-boot.lds does it. Without this, the boot hangs when built with newer GCC (since 4.6). Older toolchains hid the issue by converting -fpic to -fPIC. Signed-off-by: Scott Wood <scottwood@freescale.com>
This commit is contained in:
parent
418396e212
commit
d2a97daf62
@ -51,13 +51,14 @@ SECTIONS
|
|||||||
PROVIDE (erotext = .);
|
PROVIDE (erotext = .);
|
||||||
.reloc :
|
.reloc :
|
||||||
{
|
{
|
||||||
KEEP(*(.got))
|
|
||||||
_GOT2_TABLE_ = .;
|
_GOT2_TABLE_ = .;
|
||||||
KEEP(*(.got2))
|
KEEP(*(.got2))
|
||||||
|
KEEP(*(.got))
|
||||||
|
PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
|
||||||
_FIXUP_TABLE_ = .;
|
_FIXUP_TABLE_ = .;
|
||||||
KEEP(*(.fixup))
|
KEEP(*(.fixup))
|
||||||
}
|
}
|
||||||
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
|
__got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
|
||||||
__fixup_entries = (. - _FIXUP_TABLE_) >> 2;
|
__fixup_entries = (. - _FIXUP_TABLE_) >> 2;
|
||||||
|
|
||||||
.data :
|
.data :
|
||||||
|
@ -37,10 +37,12 @@ SECTIONS
|
|||||||
.reloc : {
|
.reloc : {
|
||||||
_GOT2_TABLE_ = .;
|
_GOT2_TABLE_ = .;
|
||||||
KEEP(*(.got2))
|
KEEP(*(.got2))
|
||||||
|
KEEP(*(.got))
|
||||||
|
PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
|
||||||
_FIXUP_TABLE_ = .;
|
_FIXUP_TABLE_ = .;
|
||||||
KEEP(*(.fixup))
|
KEEP(*(.fixup))
|
||||||
}
|
}
|
||||||
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
|
__got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
|
||||||
__fixup_entries = (. - _FIXUP_TABLE_) >> 2;
|
__fixup_entries = (. - _FIXUP_TABLE_) >> 2;
|
||||||
|
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user