bhushan verma wrote:
> in \usr\src\cmd\sgs\rtld\common/elf.c
> the function elf_rtld_load() there is a macro #if defined(i386) under which 
> elf_reloc_relacount() is called 
> can anybody please help me to find out,why this is for intel not for other 
> sparc and AMD64

It looks like an optimization that was applied to i386, could have
been applied to AMD64 too.   On both architectures, the procedure linkage
table resides in shared text but uses addresses in the private global offset
table.  These .got entries need relative relocations applied to them before
their use.  In i386/_setup.c we skip .plt relocations, and only apply
them if we determine we'll later jump through an ld.so.1 lazy binding, in
which case, elf_reloc_relacount() performs the .plt relative relocations.
In amd64/_setup.c we include .plt's in the initial relocation count.

Inconsistent?  I believe so.

-- 
Rod

Reply via email to