summaryrefslogtreecommitdiff
path: root/nand_spl/board/freescale
diff options
context:
space:
mode:
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>2010-12-03 17:30:38 +0100
committerWolfgang Denk <wd@denx.de>2010-12-17 20:25:19 +0100
commitee0270dff748213bd009fad566c913110fbd89f9 (patch)
tree183a5e132f58f343b80e03a0e53559672f029662 /nand_spl/board/freescale
parent337f5f50f539cc1ea1e0533c096e237228f12cae (diff)
downloadu-boot-imx-ee0270dff748213bd009fad566c913110fbd89f9.zip
u-boot-imx-ee0270dff748213bd009fad566c913110fbd89f9.tar.gz
u-boot-imx-ee0270dff748213bd009fad566c913110fbd89f9.tar.bz2
PowerPC, nand_spl: Add relocation support for -fpic
By rearranging the linker script we get support for relocation of -fpic for free. Move __got2_entries outside _GOT2_TABLE_ defining scope matching the rest of PowerPC Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Scott Wood <scottwood@freescale.com> Acked-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'nand_spl/board/freescale')
-rw-r--r--nand_spl/board/freescale/mpc8313erdb/u-boot.lds4
-rw-r--r--nand_spl/board/freescale/mpc8315erdb/u-boot.lds4
2 files changed, 6 insertions, 2 deletions
diff --git a/nand_spl/board/freescale/mpc8313erdb/u-boot.lds b/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
index 138e427..f1649f8 100644
--- a/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
+++ b/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
@@ -39,8 +39,10 @@ SECTIONS
*(.sdata*)
_GOT2_TABLE_ = .;
KEEP(*(.got2))
- __got2_entries = (. - _GOT2_TABLE_) >> 2;
+ KEEP(*(.got))
+ PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
}
+ __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
. = ALIGN(8);
__bss_start = .;
diff --git a/nand_spl/board/freescale/mpc8315erdb/u-boot.lds b/nand_spl/board/freescale/mpc8315erdb/u-boot.lds
index 138e427..f1649f8 100644
--- a/nand_spl/board/freescale/mpc8315erdb/u-boot.lds
+++ b/nand_spl/board/freescale/mpc8315erdb/u-boot.lds
@@ -39,8 +39,10 @@ SECTIONS
*(.sdata*)
_GOT2_TABLE_ = .;
KEEP(*(.got2))
- __got2_entries = (. - _GOT2_TABLE_) >> 2;
+ KEEP(*(.got))
+ PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
}
+ __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
. = ALIGN(8);
__bss_start = .;