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?
Asked
Active
Viewed 5,661 times
9

zaharpopov
- 16,882
- 23
- 75
- 93
1 Answers
7
This article explains it better than I can, but basically global variables in a shared library.

user786653
- 29,780
- 4
- 43
- 53
-
2See also the sections concerning relocations in ["How To Write Shared Libraries"](http://www.akkadia.org/drepper/dsohowto.pdf) by Ulrich Drepper. – Eugene Sep 07 '11 at 11:32