mbox series

[0/4] riscv: improve link and support ARCH_WANT_LD_ORPHAN_WARN

Message ID 20230116154800.2396-1-jszhang@kernel.org (mailing list archive)
Headers show
Series riscv: improve link and support ARCH_WANT_LD_ORPHAN_WARN | expand

Message

Jisheng Zhang Jan. 16, 2023, 3:47 p.m. UTC
This series tries to improve link time handling of riscv:
patch1 adds the missing RUNTIME_DISCARD_EXIT as suggested by Masahiro.

Similar as other architectures such as x86, arm64 and so on, enable
ARCH_WANT_LD_ORPHAN_WARN to enable linker orphan warnings to prevent
from missing any new sections in future. So the following two patches
are preparation patches, and the last patch finally selects
ARCH_WANT_LD_ORPHAN_WARN

Jisheng Zhang (4):
  riscv: lds: define RUNTIME_DISCARD_EXIT
  riscv: vmlinux.lds.S: explicitly catch .rela.dyn symbols
  riscv: vmlinux.lds.S: explicitly catch .riscv.attributes sections
  riscv: select ARCH_WANT_LD_ORPHAN_WARN for !XIP_KERNEL

 arch/riscv/Kconfig              | 1 +
 arch/riscv/kernel/vmlinux.lds.S | 6 ++++++
 2 files changed, 7 insertions(+)