u-boot-nand_spl.lds 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * (C) Copyright 2006
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de
  4. *
  5. * Copyright 2009 Freescale Semiconductor, Inc.
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #include "config.h"
  10. OUTPUT_ARCH(powerpc)
  11. SECTIONS
  12. {
  13. . = 0xfff00000;
  14. .text : {
  15. *(.text*)
  16. }
  17. _etext = .;
  18. .reloc : {
  19. _GOT2_TABLE_ = .;
  20. KEEP(*(.got2))
  21. KEEP(*(.got))
  22. PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
  23. _FIXUP_TABLE_ = .;
  24. KEEP(*(.fixup))
  25. }
  26. __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
  27. __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
  28. . = ALIGN(8);
  29. .data : {
  30. *(.rodata*)
  31. *(.data*)
  32. *(.sdata*)
  33. }
  34. _edata = .;
  35. .u_boot_list : {
  36. KEEP(*(SORT(.u_boot_list*)));
  37. }
  38. . = ALIGN(8);
  39. __init_begin = .;
  40. __init_end = .;
  41. #if defined(CONFIG_FSL_IFC) /* Restrict bootpg at 4K boundry for IFC */
  42. .bootpg ADDR(.text) + 0x1000 :
  43. {
  44. start.o (.bootpg)
  45. }
  46. #define RESET_VECTOR_OFFSET 0x1ffc /* IFC has 8K sram */
  47. #elif defined(CONFIG_FSL_ELBC)
  48. #define RESET_VECTOR_OFFSET 0xffc /* LBC has 4k sram */
  49. #else
  50. #error unknown NAND controller
  51. #endif
  52. .resetvec ADDR(.text) + RESET_VECTOR_OFFSET : {
  53. KEEP(*(.resetvec))
  54. } = 0xffff
  55. __bss_start = .;
  56. .bss : {
  57. *(.sbss*)
  58. *(.bss*)
  59. }
  60. __bss_end = .;
  61. }
  62. ASSERT(__init_end <= (0xfff00000 + RESET_VECTOR_OFFSET), "NAND bootstrap too big");