CFLAGS+= -fPIC per default?
Joseph Fenton
jlfenton at citlink.net
Sun Feb 22 15:50:18 PST 2004
Marcel Moolenaar wrote:
>>>The fundamental property of PIC , besides the fact that it's a
>>>complete misnomer, is that there are no relocations in the code
>>>segment.
>>>
>>>
>>>
>>You just proved my statement true. PC-relative code contains no
>>relocation for within a code section. How do you think that conditional
>>branches work? They do PC-relative jumps inside the code section.
>>
>>
>
>You fail to see the point. PC relative relocations are not
>guaranteed to be without relocation and hence are not by
>definition PIC.
>
>
>
That makes no sense. Why would you relocate a PC-relative reference
unless it was an access across sections? Do you mean to say that all
Jcc <reladdr> opcodes are relocated? If not, then obviously PC-relative
addresses are not always relocated and therefore suitable for PIC.
More information about the freebsd-amd64
mailing list