gpt4 book ai didi

linux - Linux 上的所有 MIPS 代码都应该是 PIC 吗?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:21:47 26 4
gpt4 key购买 nike

在 MIPS CPU(准确地说是 MIPSEL32)上的 Linux 中,是否所有用户空间 SO 都应该是位置无关的 (PIC)?来自权威来源的引用是最好的。

Android 怎么样?

我的兴趣源于this .

最佳答案

Linux 上 PIC 代码的情况似乎有些有趣。过去(EGLIBC-2.9 之前)MIPS 上的所有二进制文件都应该是 PIC(应用程序和共享库)。然而,为了减小应用程序的大小,开发了 ABI 扩展以允许非 PIC 可执行文件(但共享对象仍然是 PIC,和以前一样):

At this time we do not propose any change to the position-independent addressing conventions used by shared objects. Similarly, position-independent executables compiled with '-fpie' -- as required for address space randomisation in "hardened" Linux distributions -- shall continue to use the existing psABI addressing and calling mechanisms.

http://gcc.gnu.org/ml/gcc/2008-07/txt00000.txt

linux-mips.org 上声明所有 MIPS 上的二进制文件必须是 PIC 的维基页面似乎有些过时,因为 Linux 上最近的 GCC 和 EGLIBC 都支持非 PIC 可执行文件:http://www.linux-mips.org/wiki/PIC_code

关于linux - Linux 上的所有 MIPS 代码都应该是 PIC 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20413290/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com