Discussion:
Load_User_Program
(too old to reply)
John Kim
2005-02-19 22:35:48 UTC
Permalink
I am confused about what the "hints" refer to in Load_User_Program.

/*
* Hints:
* - Determine where in memory each executable segment will be
placed
* - Determine size of argument block and where in memory it
will be placed
* - Copy each executable segment into memory
* - Format argument block in memory
* - In the created User_Context object, set code entry point
* address, argument block address, and initial kernel stack
pointer address
*/

The project description is very vague as well in describing how to
access the memory segments and where to copy them as well.

Do we copy the program headers from the exeFormat to the LDT? or
how do we access the information from the program header itself
and translate that to a segment? Am I even asking the right
question? Someone please help.

-John
Joe Barrett
2005-02-19 22:52:28 UTC
Permalink
Post by John Kim
Do we copy the program headers from the exeFormat to the LDT? or
how do we access the information from the program header itself
and translate that to a segment? Am I even asking the right
question? Someone please help.
I am also confused on this aspect. I was under the impression that the
"memory" field of userContext stored the contents of the exeFileData -
but perhaps this field is where we store the two memory segments (data &
text) ?

Joe
Zhe
2005-02-19 23:35:01 UTC
Permalink
memory stores the parsed data/code segments which are in the exeFileData, I
copied each segment (2) into the char * memory with the example they have in
Kernel Thread.
hope this helps

Zhe
William Francis Cladek
2005-02-20 21:12:03 UTC
Permalink
In the project description it says "The startAddress and lengthInFile
fields in Exe_Segment will tell you where the segments must be copied, and
their sizes." Why are we using lengthInFile? Should we (or could we) use
sizeInMemory to determine the size? I'm a little unclear about the
difference, if any, between those fields. The ELF documentation
doesn't really say, aside from saying one is for memory image and one is
for file image.

Will
Post by Zhe
memory stores the parsed data/code segments which are in the exeFileData, I
copied each segment (2) into the char * memory with the example they have in
Kernel Thread.
hope this helps
Zhe
Loading...