简体   繁体   English

使用RIP寻址,为什么x86-64仍然需要重定位?

[英]with RIP-addressing, why x86-64 still need relocations?

So x86-64 has the RIP-relative addressings which makes PIC codes easy to write and relocations needed much less. 因此x86-64具有RIP相对地址,这使得PIC代码易于编写,重定位所需的更少。 Why is relocations still needed then on x86-64? 为什么在x86-64上仍然需要重定位? For what features? 有什么功能? I can try to explore with objdump but what C/C++ code patterns to compile to see? 我可以尝试使用objdump进行探索但是要编译哪些C / C ++代码模式?

本文更好地解释了它,但基本上是共享库中的全局变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM