Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Proposal for STT_GNU_IFUNC and DT_GNU_* tags
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
H.J. Lu  
View profile  
 More options May 27, 1:12 pm
From: "H.J. Lu" <hjl.to...@gmail.com>
Date: Wed, 27 May 2009 10:12:41 -0700
Local: Wed, May 27 2009 1:12 pm
Subject: Proposal for STT_GNU_IFUNC and DT_GNU_* tags
Here is the updated proposal for STT_GNU_IFUNC and DT_GNU_* tags.

H.J.
----
STT_GNU_IFUNC

      This symbol type is the same as STT_FUNC except that it always
      points to a function or piece of executable code which takes no
      arguments and returns a function pointer.  If an STT_GNU_IFUNC
      symbol is referred to by a relocation, then evaluation of that
      relocation is delayed until load-time.  The value used in the
      relocation is the function pointer returned by an invocation
      of the STT_GNU_IFUNC symbol.

      The purpose of this symbol type is to allow the run-time to
      select between multiple versions of the implementation of a
      specific function.  The selection made in general will take the
      currently available hardware into account and select the most
      appropriate version.

STT_GNU_IFUNC is defined in OS-specific range:

#define STT_LOOS        10      /* OS-specific semantics */
#define STT_GNU_IFUNC   10      /* Symbol is an indirect code object */
#define STT_HIOS        12      /* OS-specific semantics */

STT_GNU_IFUNC symbols can be in shared object, dynamic executable and
gnu-6:pts/3[46]> cat ifunc.txt               /export/gnu/import/svn/psABI/ifunc
STT_GNU_IFUNC

      This symbol type is the same as STT_FUNC except that it always
      points to a function or piece of executable code which takes no
      arguments and returns a function pointer.  If an STT_GNU_IFUNC
      symbol is referred to by a relocation, then evaluation of that
      relocation is delayed until load-time.  The value used in the
      relocation is the function pointer returned by an invocation
      of the STT_GNU_IFUNC symbol.

      The purpose of this symbol type is to allow the run-time to
      select between multiple versions of the implementation of a
      specific function.  The selection made in general will take the
      currently available hardware into account and select the most
      appropriate version.

STT_GNU_IFUNC is defined in OS-specific range:

#define STT_LOOS        10      /* OS-specific semantics */
#define STT_GNU_IFUNC   10      /* Symbol is an indirect code object */
#define STT_HIOS        12      /* OS-specific semantics */

STT_GNU_IFUNC symbols can be in shared object, dynamic executable and
static executable.  DT_GNU_XXX tags are used to mark the indirect
relocation table for relocations against locally defined STT_GNU_IFUNC
symbols.

DT_GNU_IRELA

      This element holds the address of the indirect relocation table with
      explicit addends, such as Elf32_Rela for the 32-bit file class or
      Elf64_Rela for the 64-bit file class. If this element is present,
      the dynamic structure must also have DT_GNU_IRELASZ and
      DT_GNU_IRELAENT elements.

DT_GNU_IRELASZ

      This element holds the total size, in bytes, of the DT_GNU_IRELA
      relocation table.

DT_GNU_IRELAENT

      This element holds the size, in bytes, of the DT_GNU_IRELA
      relocation entry.

DT_GNU_IREL

      This element is similar to DT_GNU_IRELA, except its table has
      implicit addends, such as Elf32_Rel for the 32-bit file class or
      Elf64_Rel for the 64-bit file class. If this element is present,
      the dynamic structure must also have DT_GNU_IRELSZ and
      DT_GNU_IRELENT elements.

DT_GNU_IRELSZ

      This element holds the total size, in bytes, of the DT_GNU_IREL
      relocation table.

DT_GNU_IRELENT

      This element holds the size, in bytes, of the DT_GNU_IREL
      relocation entry.

DT_GNU_ITEXTREL

      This element holds the address of low and high addresses, in that
      order, in non-writable segment where relocation entries apply.

Relocations in the indirect relocation table don't require name lookup
and their symbol values are zero. The value used in the relocation is
the program address returned by the function, which takes no arguments,
at the address of the result of the corresponding R_*_* relocation.

The purpose of the indirect relocation table to support executables and
avoid name lookup for locally defined STT_GNU_IFUNC symbols at load-time.

The indirect relocation table is optional. Either DT_GNU_IRELA or
DT_GNU_IREL may occur, not both. It should be processed as soon as the
object is relocated.

DT_GNU_ITEXTREL is required if the indirect relocation table contains
relocation entries which modify non-writable segment.

#define DT_VALRNGLO     0x6ffffd00
#define DT_GNU_IRELASZ  0x6ffffdf1
#define DT_GNU_IRELAENT 0x6ffffdf2
#define DT_GNU_IRELSZ   0x6ffffdf3
#define DT_GNU_IRELENT  0x6ffffdf4
#define DT_VALRNGHI     0x6ffffdff

#define DT_ADDRRNGLO    0x6ffffe00
#define DT_GNU_IRELA    0x6ffffef2
#define DT_GNU_IREL     0x6ffffef3
#define DT_GNU_ITEXTREL 0x6ffffef4
#define DT_ADDRRNGHI    0x6ffffeff


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google