I'm confused. I try in Linux on x86.
+1
A:
PIC just makes live more simple for the loader since it only has to modify a few global addresses in the code. Non-PIC code just contains a lot more of these addresses, so the table with addresses which need relocation are bigger. But the loader must be able to relocate the code in either case (for example, to resolve the addresses of static/global variables and all function pointers).
Aaron Digulla
2009-11-12 09:50:18
MUST??? usually this does not work at all
vitaly.v.ch
2009-11-12 10:02:06
You always have some symbols which are accessed via their global address. These addresses must always be relocated. In the past, such code was often mapped to a fixed address but with the advent of buffer overflows, OSs will map an app to ever changing addresses to make these kinds of attacks harder.
Aaron Digulla
2009-11-12 11:20:45