hyp.lds.S 776 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2020 Google LLC.
  4. * Written by David Brazdil <[email protected]>
  5. *
  6. * Linker script used for partial linking of nVHE EL2 object files.
  7. */
  8. #include <asm/hyp_image.h>
  9. #include <asm-generic/vmlinux.lds.h>
  10. #include <asm/cache.h>
  11. #include <asm/memory.h>
  12. SECTIONS {
  13. HYP_SECTION(.idmap.text)
  14. HYP_SECTION(.text)
  15. HYP_SECTION(.data..ro_after_init)
  16. HYP_SECTION(.rodata)
  17. #ifdef CONFIG_TRACING
  18. . = ALIGN(PAGE_SIZE);
  19. HYP_SECTION(.event_ids)
  20. #endif
  21. /*
  22. * .hyp..data..percpu needs to be page aligned to maintain the same
  23. * alignment for when linking into vmlinux.
  24. */
  25. . = ALIGN(PAGE_SIZE);
  26. BEGIN_HYP_SECTION(.data..percpu)
  27. PERCPU_INPUT(L1_CACHE_BYTES)
  28. END_HYP_SECTION
  29. HYP_SECTION(.bss)
  30. HYP_SECTION(.data)
  31. }