vmlinux.lds.S 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * Linker script for Hexagon kernel
  3. *
  4. * Copyright (c) 2010-2011, 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. #define LOAD_OFFSET PAGE_OFFSET
  21. #include <asm-generic/vmlinux.lds.h>
  22. #include <asm/asm-offsets.h> /* Most of the kernel defines are here */
  23. #include <asm/mem-layout.h> /* except for page_offset */
  24. #include <asm/cache.h> /* and now we're pulling cache line size */
  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. /* This LOAD_OFFSET is temporary for debugging on the simulator; it may change
  34. for hypervisor pseudo-physical memory. */
  35. SECTIONS
  36. {
  37. . = PAGE_OFFSET + LOAD_ADDRESS;
  38. __init_begin = .;
  39. HEAD_TEXT_SECTION
  40. INIT_TEXT_SECTION(PAGE_SIZE)
  41. PERCPU_SECTION(L1_CACHE_BYTES)
  42. __init_end = .;
  43. . = ALIGN(_PAGE_SIZE);
  44. _stext = .;
  45. .text : AT(ADDR(.text) - LOAD_OFFSET) {
  46. _text = .;
  47. TEXT_TEXT
  48. SCHED_TEXT
  49. LOCK_TEXT
  50. KPROBES_TEXT
  51. *(.fixup)
  52. }
  53. _etext = .;
  54. INIT_DATA_SECTION(PAGE_SIZE)
  55. _sdata = .;
  56. RW_DATA_SECTION(32,PAGE_SIZE,PAGE_SIZE)
  57. RO_DATA_SECTION(PAGE_SIZE)
  58. _edata = .;
  59. EXCEPTION_TABLE(16)
  60. NOTES
  61. BSS_SECTION(_PAGE_SIZE, _PAGE_SIZE, _PAGE_SIZE)
  62. _end = .;
  63. /DISCARD/ : {
  64. EXIT_TEXT
  65. EXIT_DATA
  66. EXIT_CALL
  67. }
  68. STABS_DEBUG
  69. DWARF_DEBUG
  70. }