PDA

View Full Version : [C/C++ shared libs] References cause pointer relocations too?



kangaba
April 5th, 2014, 01:25 PM
Hi,
"How to write shared libraries" generally says a pointer (the * sign) will cause a relocation at runtime (load time? - whichever), but does a reference (the & sign) also cause a relocation?

ofnuts
April 5th, 2014, 01:36 PM
Under the hood there is very little difference betwen references and pointers (all compiler implement references as pointers), so I would expect both to behave the same way in your case.