Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. Why is relocations still needed then on x86-64? For what features? I can try to explore with objdump but what C/C++ code patterns to compile to see?

like image 647
zaharpopov Avatar asked Sep 06 '11 07:09

zaharpopov


1 Answers

This article explains it better than I can, but basically global variables in a shared library.

like image 120
user786653 Avatar answered Sep 23 '22 15:09

user786653