vmlinux.lds.S 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Linker script for Hexagon kernel
  4. *
  5. * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
  6. */
  7. #include <asm-generic/vmlinux.lds.h>
  8. #include <asm/asm-offsets.h> /* Most of the kernel defines are here */
  9. #include <asm/mem-layout.h> /* except for page_offset */
  10. #include <asm/cache.h> /* and now we're pulling cache line size */
  11. #include <asm/thread_info.h> /* and we need THREAD_SIZE too */
  12. OUTPUT_ARCH(hexagon)
  13. ENTRY(stext)
  14. jiffies = jiffies_64;
  15. /*
  16. See asm-generic/vmlinux.lds.h for expansion of some of these macros.
  17. See asm-generic/sections.h for seemingly required labels.
  18. */
  19. #define PAGE_SIZE _PAGE_SIZE
  20. SECTIONS
  21. {
  22. . = PAGE_OFFSET;
  23. __init_begin = .;
  24. HEAD_TEXT_SECTION
  25. INIT_TEXT_SECTION(PAGE_SIZE)
  26. PERCPU_SECTION(L1_CACHE_BYTES)
  27. __init_end = .;
  28. . = ALIGN(_PAGE_SIZE);
  29. _stext = .;
  30. .text : AT(ADDR(.text)) {
  31. _text = .;
  32. TEXT_TEXT
  33. IRQENTRY_TEXT
  34. SOFTIRQENTRY_TEXT
  35. SCHED_TEXT
  36. CPUIDLE_TEXT
  37. LOCK_TEXT
  38. KPROBES_TEXT
  39. *(.fixup)
  40. }
  41. _etext = .;
  42. INIT_DATA_SECTION(PAGE_SIZE)
  43. _sdata = .;
  44. RW_DATA(32,PAGE_SIZE,_THREAD_SIZE)
  45. RO_DATA(PAGE_SIZE)
  46. _edata = .;
  47. EXCEPTION_TABLE(16)
  48. BSS_SECTION(_PAGE_SIZE, _PAGE_SIZE, _PAGE_SIZE)
  49. _end = .;
  50. STABS_DEBUG
  51. DWARF_DEBUG
  52. ELF_DETAILS
  53. DISCARDS
  54. }