我对内核如何加载到内存有一些疑问。检查后/proc/kallsyms
我能够找到内核中各种符号的地址。
$ cat /proc/kallsyms | head -n 10
00000000 t __vectors_start
80008240 T asm_do_IRQ
80008240 T _stext
80008240 T __exception_text_start
80008244 T do_undefinstr
80008408 T do_IPI
8000840c T do_DataAbort
800084a8 T do_PrefetchAbort
80008544 t gic_handle_irq
800085a0 T secondary_startup
- 有什么方法可以找到加载内核的基地址吗?
- 在用户空间中,假设我使用 libc
puts
函数位于偏移量 0x200 处。当加载到内存中时,指定地址0x8048000
,我将能够找到已解决的puts
at 0x8048000 + 0x200
。对于内核也同样适用吗?即内核映像是否作为 1 个连续的加载到内存中.text
部分?
for MIPS建筑学
file Platform包含分配有物理地址空间中的位置的字段/变量“load-...”。
example:
openwrt/build_dir/target-mips_mips32_musl-1.1.16/linux-brcm63xx_smp/linux-4.4.14/arch/mips/bcm63xx/平台
#
# Broadcom BCM63XX boards
#
platform-$(CONFIG_BCM63XX) += bcm63xx/
cflags-$(CONFIG_BCM63XX) += \
-I$(srctree)/arch/mips/include/asm/mach-bcm63xx/
load-$(CONFIG_BCM63XX) := 0xffffffff80010000
for ARM建筑学
file 生成文件.boot包含分配有物理地址空间中的位置的字段/变量“zreladdr-y”。
example:
openwrt/build_dir/target-mips_mips32_musl-1.1.16/linux-brcm63xx_smp/linux-4.4.14/arch/arm/mach-omap1/Makefile.boot
zreladdr-y += 0x10008000
params_phys-y := 0x10000100
initrd_phys-y := 0x10800000
for 微火建筑学
file Makefile包含分配有物理地址空间中的位置的字段/变量“UIMAGE_LOADADDR”(从 Xilinx ISE 导出)。
example:
openwrt/build_dir/target-mips_mips32_musl-1.1.16/linux-brcm63xx_smp/linux-4.4.14/arch/microblaze/boot/Makefile
UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)