Kevin Brosius on 18 May 2004 17:24:02 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] ldt_modify and detailed information


> howdy,
> 
>  i want to write a programmer which create and uses it's own memory segment
>  on x86. the problem is i can not find much information on how to use it. 
>  when i search for modify_ldt, i just get a lot of man pages. does anybody
>  know any books (online or dead tree), articles, stone tablets, etc, that
>  explains in detail how to use ldt_modify, how not to have mem segs trample
>  each other in the address space, how the loader places the different
>  segments (code, text, etc) and how it access it during the program
>  running. i hope it is a not more complicated than just saying "create new
>  mem seg" and loading the CR3 register whenever i want to use it...
> 
>  this is not only for something i want to write, but an academic exercise
>  to see if i can do it and learn from it.
> 
>  thanks,
>  -- adam grossman


Interesting question ... are you trying to study compilers and linkers
or do some user application programming?  I wasn't sure, because your
initial question asks about *ldt (which I'm not the familiar with, but a
quick check shows it's a process memory management interface) but then
you talk about the program accessing memory.  Generally program access
to memory is handled by functions supplied by the language you are using
(malloc/free in C, for example)

If you wanted to study linkers/loaders you might want to do some
searching on the linker (gnu ld on linux) or the loader (escapes me at
the moment.)

-- 
Kevin Brosius
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug