This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [IFUNC] PATCH: Add an ifunc attribute


On Thu, Jul 23, 2009 at 10:39:03AM -0700, Richard Henderson wrote:
> Not for locally defined functions, no.  For 64-bit, we use
> a PC-relative reference (leaq foo(%rip),%rax), and for 32-bit
> we use a GP-relative reference (leal foo@GOTOFF(%ebx),%eax).
> 
> In neither case to we read from the GOT.  Not all other
> targets have that option.  Indeed, the only two other targets
> I can find right away that can support this are Alpha and IA64.
> The others lack the proper relocations.
> 
> (Although I'll say that for PowerPC this is a shame, since with
> an addis/addi and appropriate relocations, I suspect the number
> of relocations required for a DSO would drop considerably.)

Isn't this the same as PI_STATIC_AND_HIDDEN in glibc?  If so,
S/390 and SH claim to support it also; I don't remember if
ARM does, but I know it could with existing relocations.
Not necessarily in the most optimal way, but at least by a constant
pool entry.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]