vmlinux.lds.S 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Linker script for Hexagon kernel
  3. *
  4. * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 and
  8. * only version 2 as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  18. * 02110-1301, USA.
  19. */
  20. #include <asm-generic/vmlinux.lds.h>
  21. #include <asm/asm-offsets.h> /* Most of the kernel defines are here */
  22. #include <asm/mem-layout.h> /* except for page_offset */
  23. #include <asm/cache.h> /* and now we're pulling cache line size */
  24. #include <asm/thread_info.h> /* and we need THREAD_SIZE too */
  25. OUTPUT_ARCH(hexagon)
  26. ENTRY(stext)
  27. jiffies = jiffies_64;
  28. /*
  29. See asm-generic/vmlinux.lds.h for expansion of some of these macros.
  30. See asm-generic/sections.h for seemingly required labels.
  31. */
  32. #define PAGE_SIZE _PAGE_SIZE
  33. SECTIONS
  34. {
  35. . = PAGE_OFFSET;
  36. __init_begin = .;
  37. HEAD_TEXT_SECTION
  38. INIT_TEXT_SECTION(PAGE_SIZE)
  39. PERCPU_SECTION(L1_CACHE_BYTES)
  40. __init_end = .;
  41. . = ALIGN(_PAGE_SIZE);
  42. _stext = .;
  43. .text : AT(ADDR(.text)) {
  44. _text = .;
  45. TEXT_TEXT
  46. SCHED_TEXT
  47. CPUIDLE_TEXT
  48. LOCK_TEXT
  49. KPROBES_TEXT
  50. *(.fixup)
  51. }
  52. _etext = .;
  53. INIT_DATA_SECTION(PAGE_SIZE)
  54. _sdata = .;
  55. RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE)
  56. RO_DATA_SECTION(PAGE_SIZE)
  57. _edata = .;
  58. EXCEPTION_TABLE(16)
  59. NOTES
  60. BSS_SECTION(_PAGE_SIZE, _PAGE_SIZE, _PAGE_SIZE)
  61. _end = .;
  62. /DISCARD/ : {
  63. EXIT_TEXT
  64. EXIT_DATA
  65. EXIT_CALL
  66. }
  67. STABS_DEBUG
  68. DWARF_DEBUG
  69. }