Safe Identical Code Folding for X86-64.
Sriraman Tallam
tmsriram@google.com
Fri Jan 22 01:26:00 GMT 2010
On Thu, Jan 21, 2010 at 5:16 PM, John Reiser <jreiser@bitwagon.com> wrote:
> On 01/21/2010 04:51 PM, Sriraman Tallam wrote:
>
>> I am implementing a safe ICF option for gold ... for AMD X86-64. ...
>
>> Case (i) : For position dependent code (non-PIC), there is no
>> problem. A function call is always a PC relative relocation and a
>> function pointer is a direct relocation.
>
> That depends on the compiler. I have a compiler that uses no relocation
> at all for a CALL if the target is visible in the same compilation unit.
> The displacement is computed at compile time, and used as a constant.
> Also, in some cases a function pointer can be created by %rip-relative
> LEA using a constant displacement with no relocation at all.
Is it true even if you use -ffunction-sections ?
>
> Is the proposed ICF for gcc only? What are the assumptions
> about the properties of compiler-generated code?
>
> --
>
More information about the Binutils
mailing list