Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Feb 2004 16:42:52 -0700
From:      Joseph Fenton <jlfenton@citlink.net>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: CFLAGS+= -fPIC per default?
Message-ID:  <40393E7C.2000300@citlink.net>
In-Reply-To: <20040222231735.GA79618@dhcp01.pn.xcllnt.net>
References:  <20040222185212.EB6BE16A4D1@hub.freebsd.org> <40391EC6.7010808@citlink.net> <20040222220210.GA54064@dhcp01.pn.xcllnt.net> <40393010.4090402@citlink.net> <20040222231735.GA79618@dhcp01.pn.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40393E7C.2000300>