Interpretation of values reported by nm

mp1 at sdcc12.UUCP mp1 at sdcc12.UUCP
Fri Jul 1 12:02:09 AEST 1988


In article <4650 at killer.UUCP>, richardh at killer.UUCP (Richard Hargrove) writes:
> I nm /system5, ALL of the addresses, except for u, begin with 0x02.
> Specifically, proc is 0x0228365a, v is 0x022027ec, etc.
                          ^^^^
			  ----  Segment selector
			      ^^^^
			      -------  Offset in selector.
You can't use these directly as offsets into physical memory
device.

You need to find the GDT (Global Descriptor Table) and use
selector as an index into it to find the _physical_ address of
the segment, then add the offset. THAT should be the location to
lseek to. This isin't a feature! :-)

These numbers may look big, but the lower 3 bits mean special
things to the system (which table and the privledge level).
There's actually only 8192 segments in the GDT (Maximum. Some
get gobbled up by process table entries and buffer cache selectors)

Advise you get a book on the 80286 that has a section on
PVA (Protected Virtual Addressing) mode. This will tell what
these all mean.

> <selector> prepended to <offset>. Is that the case here?
Yes.
> richard hargrove
> ...!{ihnp4 | codas | cbosgd}!killer!richardh

Eric Dorman				Kirk- "Wheels, Mr. Spock"
University of California, San Diego	Spock- "A flivver, Captain"
Scripps Institution of Oceanography	  From-"A Piece of the Action"
 siolmd!eric at sdsioa.ucsd.edu
 mp1 at sdcc12.ucsd.edu  Attn: eric
 dorman at mplvax.nosc.mil  Attn: eric



More information about the Comp.unix.microport mailing list