DragonOS/docs/kernel/process_management/load_binary.md

16 lines
790 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 加载程序
## 1. 二进制程序装载
  在小节你将了解DragonOS的二进制程序加载器的原理。
  DragonOS在装载二进制程序时执行了“探测-装载”的过程。
  在探测阶段DragonOS会读取文件首部然后依次调用各个二进制加载器的探测函数判断该二进制程序是否适用于该加载器。如果适用则使用这个加载器进行装载。
  在装载阶段DragonOS会使用上述加载器进行装载。装载器会将二进制程序的各个段映射到内存中并且得到二进制程序的入口地址。
:::{note}
目前DragonOS不支持动态链接因此所有的二进制程序都是静态链接的。并且暂时支持的只有ELF加载器。
:::