[LLVMdev] Hwo to guess PC-relative offset

HEITZMANN Frédéric 218168 frederic.heitzmann at cea.fr
Mon Jun 29 07:23:01 PDT 2015


> De : Joerg Sonnenberger [mailto:joerg at britannica.bec.de]
> 
> The basic idea is to still create a relocation on the MC level, but fix it up later.
> You didn't say if your ISA is fixed or variable length, the former, can simplify
> this quite bit. The constant island pass generally tries to address two issues:
> (1) Merging of identical constants.
> (2) Splitting the constant island if the function gets too large.
> 
> Joerg

Hi Joerg,

ISA is actually fixed length.
If I get it right, unless the function gets too big,
I could at least have a suboptimal thus functional binary, without the constant island pass.
Could you spot the hook(s) I should use add a relocation (or do you mean fixup ?) and where I should fix it ?

--
Fred

 




More information about the llvm-dev mailing list