From sacadmin Tue Sep 26 11:40:58 2006
Received: from jurassic.eng.sun.com (jurassic.SFBay.Sun.COM [129.146.224.31])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k8QIewLe026103
	for <psarc@sac.sfbay.sun.com>; Tue, 26 Sep 2006 11:40:58 -0700 (PDT)
Received: from [129.146.226.100] (chaz.SFBay.Sun.COM [129.146.226.100])
	by jurassic.eng.sun.com (8.13.8+Sun/8.13.8) with ESMTP id k8QIevNk514599;
	Tue, 26 Sep 2006 11:40:57 -0700 (PDT)
Message-ID: <45197407.2010707@sun.com>
Date: Tue, 26 Sep 2006 11:40:07 -0700
From: Rod Evans <Rod.Evans@sun.com>
Reply-To: Rod.Evans@sun.com
Organization: Sun Microsystems Inc.
User-Agent: Mail/News 1.5.0.4 (X11/20060731)
MIME-Version: 1.0
To: psarc@sac.sfbay.sun.com
CC: Adam.Leventhal@sun.com, Ali Bahrami <Ali.Bahrami@sun.com>
Subject: 2006/558: R_*_SIZE relocation support.
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 1955

I'm sponsoring the following case for myself.   This case qualifies for
Architectural self-review, but we wish to record the following
information.

------------------------------------------------------------------------

Dtrace requested a new relocation type, that will return the size of the
associated symbol.  See 6336605.  Developers will generate those relocations
by running a custom command which processes a tracing language.  Those
relocations will be generated by the tool itself without going through an
intermediate assembly language.  In other words, a Dtarce command will
generate a relocatable object containing these relocations, which ld(1)
must consume.  Compilers/assemblers will not be involved with this relocation
type.

Discussions with various outside ELF users have resulted in the following
new relocation definitions.

sys/elf_386.h:

   #define       R_386_SIZE32            38

sys/elf_SPARC.h:

   #define       R_SPARC_SIZE32          86
   #define       R_SPARC_SIZE64          87

sys/elf_amd64.h:

   #define       R_AMD64_SIZE32          32
   #define       R_AMD64_SIZE64          33

   #define       R_X86_64_SIZE32         R_AMD64_SIZE32
   #define       R_X86_64_SIZE64         R_AMD64_SIZE64

------------------------------------------------------------------------

The documented calculations for these are:

   NAME                VALUE   FIELD           CALCULATION

   R_386_SIZE32        38      word32          Z + A

   R_SPARC_SIZE32      86      V-word32        Z + A
   R_SPARC_SIZE64      87      V-xword64       Z + A

   R_AMD64_SIZE32      32      word32          Z + A
   R_AMD64_SIZE64      33      word64          Z + A

Where:

     Z       the size of the symbol whose index resides in the relocation
             entry

------------------------------------------------------------------------

Release Binding:               Patch/Micro
R_*_SIZE (all flavors):        Commmited


-- 

Rod.

