------- Comment #25 from stsp at users dot sourceforge dot net  2006-10-05 
19:29 -------
> "i"(&var) of course can't work with -fpic,
I tried it on an x86_64 today, and it seems to work.
If I use -m32, then it doesn't. Why?

> it would only work at the expense
> of text relocations, but those are not allowed on some architectures and
> highly undesirable on the rest of architectures.
Is this to always keep the .text section r/o?

> In position independent code,
> &var typically means you need to load that address from global offset table
So, as I understand your answer, the relocation at dynamic-link time
is not implemented at all (even on the arches where it is possible)?

> into a register, and a register of course can't satisfy "i" constraint.
Thanks for the hint. It looks like the things like "a"(&var) do
work with -fpic, which should be fine for my needs.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23200

Reply via email to