From sacadmin Wed Jan 28 13:41:09 2009
Received: from chaz.sfbay.sun.com (chaz.SFBay.Sun.COM [129.146.228.120])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n0SLf9j2002801;
	Wed, 28 Jan 2009 13:41:09 -0800 (PST)
Received: from chaz.sfbay.sun.com (localhost [127.0.0.1])
	by chaz.sfbay.sun.com (8.14.3+Sun/8.14.3) with ESMTP id n0SLfBS4023813;
	Wed, 28 Jan 2009 13:41:11 -0800 (PST)
Received: (from rie@localhost)
	by chaz.sfbay.sun.com (8.14.3+Sun/8.14.3/Submit) id n0SLfBp0023787;
	Wed, 28 Jan 2009 13:41:11 -0800 (PST)
Date: Wed, 28 Jan 2009 13:41:11 -0800 (PST)
From: Rod Evans <rie@chaz.sfbay.sun.com>
Message-Id: <200901282141.n0SLfBp0023787@chaz.sfbay.sun.com>
To: PSARC-record@sac.sfbay.sun.com
Subject: dlinfo(3c) - segment mapping retrieval [PSARC/2009/054 Self Review]
Status: RO
Content-Length: 568


Template Version: @(#)sac_nextcase %I% %G% SMI
This information is Copyright 2009 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 dlinfo(3c) - segment mapping retrieval
    1.2. Name of Document Author/Supplier:
	 Author:  Rod Evans
    1.3  Date of This Document:
	28 January, 2009
4. Technical Description
    See the case directory for more detail

6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		OSNet
    6.5. ARC review type: Automatic
    6.6. ARC Exposure: open


From sacadmin Wed Jan 28 13:43:05 2009
Received: from jurassic-x4600.sfbay.sun.com (cretaceous.SFBay.Sun.COM [129.146.17.59])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n0SLh5kb002845
	for <psarc@sac.sfbay.sun.com>; Wed, 28 Jan 2009 13:43:05 -0800 (PST)
Received: from [129.146.228.120] (chaz.SFBay.Sun.COM [129.146.228.120])
	by jurassic-x4600.sfbay.sun.com (8.14.3+Sun/8.14.3) with ESMTP id n0SLh3Za451549;
	Wed, 28 Jan 2009 13:43:03 -0800 (PST)
Message-ID: <4980D16B.403@sun.com>
Date: Wed, 28 Jan 2009 13:43:07 -0800
From: Rod Evans <Rod.Evans@sun.com>
Reply-To: Rod.Evans@sun.com
Organization: Sun Microsystems Inc.
User-Agent: Thunderbird 2.0.0.18 (X11/20081215)
MIME-Version: 1.0
To: psarc@sac.sfbay.sun.com, psarc-ext@sun.com
Subject: 2009/054: dlinfo(3c) - segment mapping retrieval
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 4215

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

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

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

A request has been made for ld.so.1 to return an objects segment mapping
information.  This method of obtaining the data would be more light weight
than having to go through things like /proc.

     6237063 request extension to dl* family to provide segment bounds
             information

With the approach of mmapobj(2), this request was put on hold, so that we
could return a public/consistent data structure.  mmapobj(2) has integrated,
and ld.so.1 now uses it(6686372).

dlinfo() will return mmapobj_result_t data by using two new flags:

  > #define	RTLD_DI_MMAPS    12		/* obtain objects mappings or */
  > #define	RTLD_DI_MMAPCNT	 13		/*	mapping count */

An auxiliary structure is used to maintain the data:

  > typedef struct {
  > 	uint_t		dlm_cnt;	/* number of mapings */
  > 	mmapobj_result_t *dlm_maps;	/* mapping information */
  > } Dl_mapinfo_t;

The user will first determine the number of mappings using a RTLD_DI_MMAPCNT
request, and then provide the appropriate buffer to a RTLD_DI_MMAPS request.
This model follows the RTLD_DI_SERINFOSIZE/RTLD_DI_SERINFO model, approved
with PSARC/2000/164 (bug id 4239213).

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

  Standard C Library Functions                           dlinfo(3C)

      .....
      RTLD_DI_MMAPCNT

          Initialize a Dl_mapinfo_t structure for the handle  that
          is  specified, for use in a RTLD_DI_MMAPS request. The p
          argument is a Dl_mapinfo_t pointer (Dl_mapinfo_t *p). On
          return  from  a  RTLD_DI_MMAPCNT  request,  the  dlm_cnt
          member indicates the number of segment mappings that the
          associated object uses.

          To  obtain  the  complete  mapping  information  for  an
          object,  a  mmapobj_result_t  array  for dlm_cnt entries
          must be allocated and assigned to the  dlm_maps  member.
          This   initialized   structure   is  then  passed  to  a
          RTLD_DI_MMAPS request. See EXAMPLES.

      RTLD_DI_MMAPS

          Obtain segment mapping information for the  handle  that
          is  specified.  The p argument is a Dl_mapinfo_t pointer
          (Dl_mapinfo_t *p). This structure  must  be  initialized
          from a previous RTLD_DI_MMAPCNT request.

          Segment mapping information is provided in an  array  of
          mmapobj_result_t structures that originate from the mma-
          pobj(2) of the associated  object.  The  dlm_cnt  member
          from  a previous RTLD_DI_MMAPCNT request must be used to
          allocate a mmapobj_result_t array. This array should  be
          assigned to the dlm_maps member. This initialized struc-
          ture is then passed to a  RTLD_DI_MMAPS  request,  where
          the  segment  mapping information is copied to the allo-
          cated mmapobj_result_t array. See EXAMPLES.

      .....

      Example 2: Use dlinfo() to obtain segment information.

      The following example demonstrates how a dynamic object  can
      inspect  its  segment  mapping  information. For simplicity,
      error checking has been omitted

          Dl_mapinfo_t   mi;
          uint_t         cnt;

          /* determine the number of segment mappings */
          dlinfo(RTLD_SELF, RTLD_DI_MMAPCNT, &mi);

          /* allocate the appropriate mapping array */
          mi.dlm_maps = malloc(mi.dlm_cnt * sizeof (mmapobj_result_t));

          /* obtain the mapping information */
          dlinfo(RTLD_SELF, RTLD_DI_MMAPS, &mi);

          for (cnt = 0; cnt < mi.dlm_cnt; cnt++) {
              (void) printf("addr=%x - memory size=%x\n",
                  mi.dlm_maps[cnt].mr_addr, mi.dlm_maps[cnt].mr_msize);
          }

------------------------------------------------------------------------
Release binding:		Patch/Micro

    dlfcn.h:
         Dl_mapinfo_t		Committed.
	RTLD_DI_SERINFO		Committed.
	RTLD_DI_SERINFOSIZE	Committed.

-- 
Rod.

From Rod.Evans@Sun.COM Wed Jan 28 13:43:07 2009
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n0SLh7cr002849
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 28 Jan 2009 13:43:07 -0800 (PST)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id n0SLh7fA021155
	for <@sunmail2sca.sfbay.sun.com:psarc-ext@sun.com>; Wed, 28 Jan 2009 13:43:07 -0800 (PST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KE700I0DAZUWF00@nwk-avmta-1.sfbay.Sun.COM> for psarc-ext@sun.com
 (ORCPT psarc-ext@sun.com); Wed, 28 Jan 2009 13:43:06 -0800 (PST)
Received: from jurassic-x4600.sfbay.sun.com ([129.146.17.59])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KE700FBYAZTB710@nwk-avmta-1.sfbay.Sun.COM> for
 psarc-ext@sun.com (ORCPT psarc-ext@sun.com); Wed,
 28 Jan 2009 13:43:05 -0800 (PST)
Received: from [129.146.228.120] (chaz.SFBay.Sun.COM [129.146.228.120])
	by jurassic-x4600.sfbay.sun.com (8.14.3+Sun/8.14.3)
 with ESMTP id n0SLh3Za451549; Wed, 28 Jan 2009 13:43:03 -0800 (PST)
Date: Wed, 28 Jan 2009 13:43:07 -0800
From: Rod Evans <Rod.Evans@Sun.COM>
Subject: 2009/054: dlinfo(3c) - segment mapping retrieval
To: psarc@sac.sfbay.sun.com, psarc-ext@Sun.COM
Reply-to: Rod.Evans@Sun.COM
Message-id: <4980D16B.403@sun.com>
Organization: Sun Microsystems Inc.
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
User-Agent: Thunderbird 2.0.0.18 (X11/20081215)
Status: RO
Content-Length: 4215

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

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

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

A request has been made for ld.so.1 to return an objects segment mapping
information.  This method of obtaining the data would be more light weight
than having to go through things like /proc.

     6237063 request extension to dl* family to provide segment bounds
             information

With the approach of mmapobj(2), this request was put on hold, so that we
could return a public/consistent data structure.  mmapobj(2) has integrated,
and ld.so.1 now uses it(6686372).

dlinfo() will return mmapobj_result_t data by using two new flags:

  > #define	RTLD_DI_MMAPS    12		/* obtain objects mappings or */
  > #define	RTLD_DI_MMAPCNT	 13		/*	mapping count */

An auxiliary structure is used to maintain the data:

  > typedef struct {
  > 	uint_t		dlm_cnt;	/* number of mapings */
  > 	mmapobj_result_t *dlm_maps;	/* mapping information */
  > } Dl_mapinfo_t;

The user will first determine the number of mappings using a RTLD_DI_MMAPCNT
request, and then provide the appropriate buffer to a RTLD_DI_MMAPS request.
This model follows the RTLD_DI_SERINFOSIZE/RTLD_DI_SERINFO model, approved
with PSARC/2000/164 (bug id 4239213).

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

  Standard C Library Functions                           dlinfo(3C)

      .....
      RTLD_DI_MMAPCNT

          Initialize a Dl_mapinfo_t structure for the handle  that
          is  specified, for use in a RTLD_DI_MMAPS request. The p
          argument is a Dl_mapinfo_t pointer (Dl_mapinfo_t *p). On
          return  from  a  RTLD_DI_MMAPCNT  request,  the  dlm_cnt
          member indicates the number of segment mappings that the
          associated object uses.

          To  obtain  the  complete  mapping  information  for  an
          object,  a  mmapobj_result_t  array  for dlm_cnt entries
          must be allocated and assigned to the  dlm_maps  member.
          This   initialized   structure   is  then  passed  to  a
          RTLD_DI_MMAPS request. See EXAMPLES.

      RTLD_DI_MMAPS

          Obtain segment mapping information for the  handle  that
          is  specified.  The p argument is a Dl_mapinfo_t pointer
          (Dl_mapinfo_t *p). This structure  must  be  initialized
          from a previous RTLD_DI_MMAPCNT request.

          Segment mapping information is provided in an  array  of
          mmapobj_result_t structures that originate from the mma-
          pobj(2) of the associated  object.  The  dlm_cnt  member
          from  a previous RTLD_DI_MMAPCNT request must be used to
          allocate a mmapobj_result_t array. This array should  be
          assigned to the dlm_maps member. This initialized struc-
          ture is then passed to a  RTLD_DI_MMAPS  request,  where
          the  segment  mapping information is copied to the allo-
          cated mmapobj_result_t array. See EXAMPLES.

      .....

      Example 2: Use dlinfo() to obtain segment information.

      The following example demonstrates how a dynamic object  can
      inspect  its  segment  mapping  information. For simplicity,
      error checking has been omitted

          Dl_mapinfo_t   mi;
          uint_t         cnt;

          /* determine the number of segment mappings */
          dlinfo(RTLD_SELF, RTLD_DI_MMAPCNT, &mi);

          /* allocate the appropriate mapping array */
          mi.dlm_maps = malloc(mi.dlm_cnt * sizeof (mmapobj_result_t));

          /* obtain the mapping information */
          dlinfo(RTLD_SELF, RTLD_DI_MMAPS, &mi);

          for (cnt = 0; cnt < mi.dlm_cnt; cnt++) {
              (void) printf("addr=%x - memory size=%x\n",
                  mi.dlm_maps[cnt].mr_addr, mi.dlm_maps[cnt].mr_msize);
          }

------------------------------------------------------------------------
Release binding:		Patch/Micro

    dlfcn.h:
         Dl_mapinfo_t		Committed.
	RTLD_DI_SERINFO		Committed.
	RTLD_DI_SERINFOSIZE	Committed.

-- 
Rod.

From sacadmin Wed Jan 28 13:47:45 2009
Received: from jurassic-x4600.sfbay.sun.com (cretaceous.SFBay.Sun.COM [129.146.17.59])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n0SLliG3002963
	for <psarc@sac.sfbay.sun.com>; Wed, 28 Jan 2009 13:47:44 -0800 (PST)
Received: from [129.146.228.120] (chaz.SFBay.Sun.COM [129.146.228.120])
	by jurassic-x4600.sfbay.sun.com (8.14.3+Sun/8.14.3) with ESMTP id n0SLlhBw452815;
	Wed, 28 Jan 2009 13:47:43 -0800 (PST)
Message-ID: <4980D283.2030005@sun.com>
Date: Wed, 28 Jan 2009 13:47:47 -0800
From: Rod Evans <Rod.Evans@sun.com>
Reply-To: Rod.Evans@sun.com
Organization: Sun Microsystems Inc.
User-Agent: Thunderbird 2.0.0.18 (X11/20081215)
MIME-Version: 1.0
To: psarc@sac.sfbay.sun.com, psarc-ext@sun.com
Subject: Re: 2009/054: dlinfo(3c) - segment mapping retrieval
References: <4980D16B.403@sun.com>
In-Reply-To: <4980D16B.403@sun.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 515

Rod Evans wrote:

> ------------------------------------------------------------------------
> Release binding:        Patch/Micro
> 
>    dlfcn.h:
>     Dl_mapinfo_t           Committed.
>     RTLD_DI_SERINFO        Committed.
>     RTLD_DI_SERINFOSIZE    Committed.

Sigh .... blindly cutting and pasting ... that should be:

  Release binding:        Patch/Micro

     dlfcn.h:
       Dl_mapinfo_t           Committed.
       RTLD_DI_MMAPCNT        Committed.
       RTLD_DI_MMAPS          Committed.

-- 

Rod.

From Rod.Evans@sun.com Wed Jan 28 13:47:48 2009
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n0SLllri002971
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 28 Jan 2009 13:47:47 -0800 (PST)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id n0SLlk2T018660
	for <@sunmail2sca.sfbay.sun.com:psarc-ext@sun.com>; Wed, 28 Jan 2009 21:47:46 GMT
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KE700803B7LW800@brm-avmta-1.central.sun.com> for psarc-ext@sun.com
 (ORCPT psarc-ext@sun.com); Wed, 28 Jan 2009 14:47:45 -0700 (MST)
Received: from jurassic-x4600.sfbay.sun.com ([129.146.17.59])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KE700FN2B7LJ0E0@brm-avmta-1.central.sun.com> for
 psarc-ext@sun.com (ORCPT psarc-ext@sun.com); Wed,
 28 Jan 2009 14:47:45 -0700 (MST)
Received: from [129.146.228.120] (chaz.SFBay.Sun.COM [129.146.228.120])
	by jurassic-x4600.sfbay.sun.com (8.14.3+Sun/8.14.3)
 with ESMTP id n0SLlhBw452815; Wed, 28 Jan 2009 13:47:43 -0800 (PST)
Date: Wed, 28 Jan 2009 13:47:47 -0800
From: Rod Evans <Rod.Evans@sun.com>
Subject: Re: 2009/054: dlinfo(3c) - segment mapping retrieval
In-reply-to: <4980D16B.403@sun.com>
To: psarc@sac.sfbay.sun.com, psarc-ext@sun.com
Reply-to: Rod.Evans@sun.com
Message-id: <4980D283.2030005@sun.com>
Organization: Sun Microsystems Inc.
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <4980D16B.403@sun.com>
User-Agent: Thunderbird 2.0.0.18 (X11/20081215)
Status: RO
Content-Length: 515

Rod Evans wrote:

> ------------------------------------------------------------------------
> Release binding:        Patch/Micro
> 
>    dlfcn.h:
>     Dl_mapinfo_t           Committed.
>     RTLD_DI_SERINFO        Committed.
>     RTLD_DI_SERINFOSIZE    Committed.

Sigh .... blindly cutting and pasting ... that should be:

  Release binding:        Patch/Micro

     dlfcn.h:
       Dl_mapinfo_t           Committed.
       RTLD_DI_MMAPCNT        Committed.
       RTLD_DI_MMAPS          Committed.

-- 

Rod.

From sacadmin Wed Jan 28 13:53:10 2009
Received: from jurassic-x4600.sfbay.sun.com (cretaceous.SFBay.Sun.COM [129.146.17.63])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n0SLrAKq003198
	for <psarc@sac.sfbay.sun.com>; Wed, 28 Jan 2009 13:53:10 -0800 (PST)
Received: from [129.146.228.120] (chaz.SFBay.Sun.COM [129.146.228.120])
	by jurassic-x4600.sfbay.sun.com (8.14.3+Sun/8.14.3) with ESMTP id n0SLr95N454419;
	Wed, 28 Jan 2009 13:53:09 -0800 (PST)
Message-ID: <4980D3C9.1080300@sun.com>
Date: Wed, 28 Jan 2009 13:53:13 -0800
From: Rod Evans <Rod.Evans@sun.com>
Reply-To: Rod.Evans@sun.com
Organization: Sun Microsystems Inc.
User-Agent: Thunderbird 2.0.0.18 (X11/20081215)
MIME-Version: 1.0
To: psarc@sac.sfbay.sun.com, psarc-ext@sun.com
Subject: 2009/054: dlinfo(3c) - segment mapping retrieval
References: <4980D16B.403@sun.com>
In-Reply-To: <4980D16B.403@sun.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 504


 > ------------------------------------------------------------------------
 > Release binding:        Patch/Micro
 >
 >    dlfcn.h:
 >     Dl_mapinfo_t           Committed.
 >     RTLD_DI_SERINFO        Committed.
 >     RTLD_DI_SERINFOSIZE    Committed.

Sigh .... blindly cutting and pasting ... that should be:

  Release binding:        Patch/Micro

     dlfcn.h:
       Dl_mapinfo_t           Committed.
       RTLD_DI_MMAPCNT        Committed.
       RTLD_DI_MMAPS          Committed.

-- 

Rod.

From Rod.Evans@sun.com Wed Jan 28 13:53:12 2009
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n0SLrC9Z003202
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 28 Jan 2009 13:53:12 -0800 (PST)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id n0SLrBQw031749
	for <@sunmail2sca.sfbay.sun.com:psarc-ext@sun.com>; Wed, 28 Jan 2009 14:53:12 -0700 (MST)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KE70091BBGNDY00@brm-avmta-1.central.sun.com> for psarc-ext@sun.com
 (ORCPT psarc-ext@sun.com); Wed, 28 Jan 2009 14:53:11 -0700 (MST)
Received: from jurassic-x4600.sfbay.sun.com ([129.146.17.59])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KE700FL1BGMJGD0@brm-avmta-1.central.sun.com> for
 psarc-ext@sun.com (ORCPT psarc-ext@sun.com); Wed,
 28 Jan 2009 14:53:11 -0700 (MST)
Received: from [129.146.228.120] (chaz.SFBay.Sun.COM [129.146.228.120])
	by jurassic-x4600.sfbay.sun.com (8.14.3+Sun/8.14.3)
 with ESMTP id n0SLr95N454419; Wed, 28 Jan 2009 13:53:09 -0800 (PST)
Date: Wed, 28 Jan 2009 13:53:13 -0800
From: Rod Evans <Rod.Evans@sun.com>
Subject: 2009/054: dlinfo(3c) - segment mapping retrieval
In-reply-to: <4980D16B.403@sun.com>
To: psarc@sac.sfbay.sun.com, psarc-ext@sun.com
Reply-to: Rod.Evans@sun.com
Message-id: <4980D3C9.1080300@sun.com>
Organization: Sun Microsystems Inc.
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <4980D16B.403@sun.com>
User-Agent: Thunderbird 2.0.0.18 (X11/20081215)
Status: RO
Content-Length: 504


 > ------------------------------------------------------------------------
 > Release binding:        Patch/Micro
 >
 >    dlfcn.h:
 >     Dl_mapinfo_t           Committed.
 >     RTLD_DI_SERINFO        Committed.
 >     RTLD_DI_SERINFOSIZE    Committed.

Sigh .... blindly cutting and pasting ... that should be:

  Release binding:        Patch/Micro

     dlfcn.h:
       Dl_mapinfo_t           Committed.
       RTLD_DI_MMAPCNT        Committed.
       RTLD_DI_MMAPS          Committed.

-- 

Rod.

From sacadmin Tue Feb  3 17:28:59 2009
Received: from jurassic-x4600.sfbay.sun.com (cretaceous.SFBay.Sun.COM [129.146.17.59])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n141SxuA009423
	for <psarc@sac.sfbay.sun.com>; Tue, 3 Feb 2009 17:28:59 -0800 (PST)
Received: from [129.146.228.120] (chaz.SFBay.Sun.COM [129.146.228.120])
	by jurassic-x4600.sfbay.sun.com (8.14.3+Sun/8.14.3) with ESMTP id n141Sv9V794834;
	Tue, 3 Feb 2009 17:28:57 -0800 (PST)
Message-ID: <4988EFCC.1080602@sun.com>
Date: Tue, 03 Feb 2009 17:30:52 -0800
From: Rod Evans <Rod.Evans@sun.com>
Reply-To: Rod.Evans@sun.com
Organization: Sun Microsystems Inc.
User-Agent: Thunderbird 2.0.0.18 (X11/20081215)
MIME-Version: 1.0
To: psarc@sac.sfbay.sun.com
CC: psarc-ext@sun.com
Subject: Re: 2009/054: dlinfo(3c) - segment mapping retrieval
References: <4980D16B.403@sun.com>
In-Reply-To: <4980D16B.403@sun.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 823


> An auxiliary structure is used to maintain the data:
> 
>  > typedef struct {
>  >     uint_t        dlm_cnt;    /* number of mapings */
>  >     mmapobj_result_t *dlm_maps;    /* mapping information */
>  > } Dl_mapinfo_t;

Minor update, this data structure has been expanded to provide
a return count of the mappings that were filled in by ld.so.1.
A user is free to use a constant array to represent a maximum
number of mappings, but ld.so.1 will return how many it provided.

  > typedef struct {
  > 	mmapobj_result_t *dlm_maps;	/* mapping information */
  > 	uint_t		dlm_acnt;	/* number of dlm_maps mappings */
  > 	uint_t		dlm_rcnt;	/* number of returned mappings */
  > } Dl_mapinfo_t;

Minor modes to the man page description and example have been
supplied with the associated bug report (6237063).


-- 

Rod.

From Rod.Evans@sun.com Tue Feb  3 17:29:02 2009
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n141T1sW009427
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 3 Feb 2009 17:29:01 -0800 (PST)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id n141SxYl024924
	for <@sunmail2sca.sfbay.sun.com:psarc-ext@sun.com>; Wed, 4 Feb 2009 01:29:00 GMT
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KEI00K01PGBEW00@nwk-avmta-2.sfbay.sun.com> for psarc-ext@sun.com
 (ORCPT psarc-ext@sun.com); Tue, 03 Feb 2009 17:28:59 -0800 (PST)
Received: from jurassic-x4600.sfbay.sun.com ([129.146.17.63])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KEI00IHSPGB3610@nwk-avmta-2.sfbay.sun.com> for
 psarc-ext@sun.com (ORCPT psarc-ext@sun.com); Tue,
 03 Feb 2009 17:28:59 -0800 (PST)
Received: from [129.146.228.120] (chaz.SFBay.Sun.COM [129.146.228.120])
	by jurassic-x4600.sfbay.sun.com (8.14.3+Sun/8.14.3)
 with ESMTP id n141Sv9V794834; Tue, 03 Feb 2009 17:28:57 -0800 (PST)
Date: Tue, 03 Feb 2009 17:30:52 -0800
From: Rod Evans <Rod.Evans@sun.com>
Subject: Re: 2009/054: dlinfo(3c) - segment mapping retrieval
In-reply-to: <4980D16B.403@sun.com>
To: psarc@sac.sfbay.sun.com
Cc: psarc-ext@sun.com
Reply-to: Rod.Evans@sun.com
Message-id: <4988EFCC.1080602@sun.com>
Organization: Sun Microsystems Inc.
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <4980D16B.403@sun.com>
User-Agent: Thunderbird 2.0.0.18 (X11/20081215)
Status: RO
Content-Length: 823


> An auxiliary structure is used to maintain the data:
> 
>  > typedef struct {
>  >     uint_t        dlm_cnt;    /* number of mapings */
>  >     mmapobj_result_t *dlm_maps;    /* mapping information */
>  > } Dl_mapinfo_t;

Minor update, this data structure has been expanded to provide
a return count of the mappings that were filled in by ld.so.1.
A user is free to use a constant array to represent a maximum
number of mappings, but ld.so.1 will return how many it provided.

  > typedef struct {
  > 	mmapobj_result_t *dlm_maps;	/* mapping information */
  > 	uint_t		dlm_acnt;	/* number of dlm_maps mappings */
  > 	uint_t		dlm_rcnt;	/* number of returned mappings */
  > } Dl_mapinfo_t;

Minor modes to the man page description and example have been
supplied with the associated bug report (6237063).


-- 

Rod.

