0002-kallsyms.patch 904 B

12345678910111213141516171819202122232425
  1. From: https://lkml.org/lkml/2016/12/31/13
  2. The build robot reports:
  3. .tmp_kallsyms1.o: In function `kallsyms_relative_base':
  4. >> (.rodata+0x8a18): undefined reference to `_text'
  5. This is when using 'make alldefconfig'. Adding this _text symbol to mark
  6. the start of the kernel as in other architecture fixes this.
  7. Signed-off-by: Stafford Horne <shorne@gmail.com>
  8. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
  9. diff -Nur linux-4.9.orig/arch/openrisc/kernel/vmlinux.lds.S linux-4.9/arch/openrisc/kernel/vmlinux.lds.S
  10. --- linux-4.9.orig/arch/openrisc/kernel/vmlinux.lds.S 2016-12-11 20:17:54.000000000 +0100
  11. +++ linux-4.9/arch/openrisc/kernel/vmlinux.lds.S 2017-01-01 12:13:43.039107518 +0100
  12. @@ -38,6 +38,8 @@
  13. /* Read-only sections, merged into text segment: */
  14. . = LOAD_BASE ;
  15. + _text = .;
  16. +
  17. /* _s_kernel_ro must be page aligned */
  18. . = ALIGN(PAGE_SIZE);
  19. _s_kernel_ro = .;