martin@ wrote:

> Module Name:  src
> Committed By: martin
> Date:         Fri Jan  3 10:01:07 UTC 2020
> 
> Modified Files:
>       src/sys/arch/zaurus/conf: Makefile.zaurus.inc ldscript.zaurus
> 
> Log Message:
> Drop CTF sections from this size restricted kernel (especially as the
> size check is on the total size of the binary, not any content/sections -
> is this a bug?)

No, it (checking the total size of the binary) is by design.

- a kernel binary is loaded by a Linux kernel module (named zbsdmod.o)
  on the native Zaurus Linux
- to load a NetBSD kernel, the whole binary is copied into /proc/zboot
  node, created by the zbsdmod.o module
- zbsdmod.o has 5MB buffers to store a copied kernel binary
- zbsdmod.o reads a kernel from the 5MB buffer and loads sections
  into the target addresses
 
https://nxr.netbsd.org/xref/src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c?r=1.12#94

---
Izumi Tsutsui

Reply via email to