64位linux内核如何启动ELF的32位进程 [英] How does the 64 bit linux kernel kick off a 32 bit process from an ELF

查看:444
本文介绍了64位linux内核如何启动ELF的32位进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过查看 binfmt_elf.c 作为内核源代码,我无法弄清生成32位进程与64位进程时内核(64位)的不同之处.

By looking at binfmt_elf.c in the kernel source, I have not been able to figure out what the kernel (64 bit) does differently when spawning a 32 bit process vs a 64 bit process.

有人可以向我解释我所缺少的吗?

Can anybody explain to me what I am missing?

(此问题与我的另一个问题有关,即关于32位指令与64位指令在同一过程中使用(

(This question is related to my other question about having 32 bit instructions in the same process as 64 bit instructions (link), but this qualifies as a separate question.)

推荐答案

如果使用 execveat 系统调用来启动新进程,则我们首先输入 fs/exec.c 插入到SYSCALL_DEFINEx(execveat ..)函数中. 然后,此函数调用以下功能:

If the execveat system call is used to start a new process, we first enter fs/exec.c in the kernel source into the SYSCALL_DEFINEx(execveat..) function. This one then calls these functions:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆