Linux上的所有MIPS代码都应该是PIC吗? [英] Is all MIPS code on Linux supposed to be PIC?

查看:70
本文介绍了Linux上的所有MIPS代码都应该是PIC吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Linux上的MIPS CPU(准确地说是MIPSEL32)上,是否所有用户区SO都应独立于位置(PIC)?权威的引用将是最好的.

In Linux on MIPS CPUs (MIPSEL32 to be precise), is it true that all userland SO's are supposed be position independent (PIC)? A cite from an authoritative source would be the the best.

Android怎么样?

How about Android?

我的兴趣来自.

推荐答案

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

The situation with PIC code on Linux appears to be somewhat interesting. In the past (pre EGLIBC-2.9) all binaries on MIPS where supposed to be PIC (both applications and shared libraries). However, to reduce the size of applications, the ABI extension was developed to allow for non-PIC executables (but shared objects stay PIC, as before):

目前,我们不建议对与位置无关的任何更改 共享对象使用的寻址约定.相似地, 与位置无关的可执行文件,使用"-fpie"编译-根据需要 用于强化" Linux发行版中的地址空间随机化- 将继续使用现有的psABI寻址和调用 机制.

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上的Wiki页面指出,MIPS上的所有二进制文件都必须是PIC的,似乎有些过时了,因为Linux上的最新GCC和EGLIBC都支持非PIC可执行文件:

The wiki page on linux-mips.org stating that all binaries on MIPS must be PIC appears to be somewhat out of date, as both recent GCC and EGLIBC on Linux support non-PIC executables: http://www.linux-mips.org/wiki/PIC_code

这篇关于Linux上的所有MIPS代码都应该是PIC吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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