PSARC/2007/509 elfedit

James Carlson james.d.carlson at Sun.COM
Thu Sep 6 05:50:24 PDT 2007


Ali Bahrami writes:
> I am sponsoring the following fast track for myself - timeout 9/12/2007

Excellent new feature!  Just two questions:

> Internal Module interface			Private

What kind of "private" is that intended to be?  "Project Private"
would prevent others from contributing modules, which might be
appropriate if you're not sure you're ready to open the interface
within ON.  "Consolidation Private" (the most likely case) would mean
that others within ON can contribute modules without special review --
likely no ARC review at all, as it seems you aren't planning on
submitting those interfaces for ARC review -- but not outside ON.

Others are possible, but those seem like the two likely choices.

> 	-r-xr-xr-x   1 root  bin   159448 Sep  3 14:32 /usr/bin/amd64/elfedit*
> 	-r-xr-xr-x   1 root  bin   124916 Sep  3 14:32 /usr/bin/elfedit*

Looking at the documentation, it seems that this utility is quite
different from mdb in the way it handles bitted-ness.

Mdb looks at the target program and then launches the correct version
(32-bit or 64-bit) as needed.  There's a tiny stub in /usr/bin that
does this:

% ls -l /usr/bin/mdb /usr/bin/i86/mdb /usr/bin/amd64/mdb
-r-xr-xr-x   2 root     bin       655528 Aug 28 12:57 /usr/bin/amd64/mdb
-r-xr-xr-x   2 root     bin       511468 Aug 28 12:57 /usr/bin/i86/mdb
-r-xr-xr-x  70 root     bin         9384 Aug 28 12:56 /usr/bin/mdb
% 

Based on the man page, it seems that this program always runs as
64-bit if the platform supports 64-bit operation.  It does so
apparently without regard to the target type.  Is that right?  Why
does it do that?  Does it need to do that?

The man page describes behavior that's almost like the existing
isaexec feature.  If that's what's needed here, then why doesn't it do
that?

(My guess is that this is borrowing design from elfdump rather than
from mdb.)

The documentation in the man page on this point seems strange:

USAGE
      When supported by the system, elfedit runs as a 64-bit 
      application, capable of processing files greater than 
      or equal to 2 Gbytes (2^31 bytes).

That's strange because you don't need to have a 64-bit application in
order to process large files.  That can't be the reason, can it?

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677



More information about the opensolaris-arc mailing list