So in this would already be talking about the section headers.
So each section contains the headers and these headers are joined in a single chunk.
So this section headers contains the name.
So this name takes eight bytes.
So the name should not be more than eight bytes.
And the second feature is virtual size.
And what's your address size R for our data pointer to our data.
So are we discussing all of this in this video?
So how to identify is the ending of the option header is the starting of the first section header.
This is very easy to.
The section headers are easy to locate because they start with the name.
So the name you can search for the DOT text here and you will be directed to this one dot text.
And here you can see in the plain text format, dot text.
So at the starting of this, this is our section header.
So the size is 40 bytes and that means that PT two and eight.
So this is the first section header.
So let's see what are the contents of this header.
So the first one is the name.
So the name tag eight bytes.
So let's consider these first eight bytes.
And here you can see if you convert this X to, uh, ASCII representation and look up in the table,
you will get this, uh, dot text.
So that identifies the section name and second one is virtual size.
So whenever I say virtual, so that means that is in the memory.
What size?
The size of this section in memory and virtual address.
So what your address is the offset from the base address where this section should start.
So if the base address is like 20,000, then virtual address.
He's at 400.
And then the text and the section starts at 20,400.
So the base setter should be added to this virtual address because this is an offset to determine the
starting location of the this section.
That is called a virtual address.
The offset from the base address and the next one is size for our data.
So size of determines the size of this section in the disk.
So signs are for our data on the disk.
And the pointer to the data.
So the pointer to raw data where that means on the disk, at which byte offset this section starts.
So here where you have virtual size and size of raw data, different means sometimes you will have file
arrangement.
So the file element says, uh, the file sections, sections in the file should start it.
It's a 200 hitch.
But unfortunately our section only takes 50 hits and that means remaining 150, which are filled with
zeros.
And this space is not to utilize it because of this file arrangement.
And these are filled with zeros and the virtual size is only 50.
In this case, because we don't want these 150 zeros in the memory.
So that's why the virtual size is defined away.
Actual data without any zeros.
So this is the size of raw data.
Actual data that is 58 and the remaining.
Sorry.
Size of raw data is 50 plus this one as well.
But what you'll see is only 50.
Because we don't want to consider these zeros in memory.
So it will take more space in memory.
So that's why there is another field of our choices to determine the actual data that are required in
the memory.
So I hope you got the difference between the size of the data and virtual size.
Now the pointer to raw data.
So at the buy at this byte area at which offset this section data starts.
And the pointer to relocations, pointer to line numbers and number of relocations, number of write
numbers.
So these can be you can see here, the next four bytes are the actual size that is zero 140 and the
next four weights are 1000.
But your address and size are for our data next for bytes 1 to 0 zero and the next one is pointer to
raw data 4000.
And if you go to 400, it will be the text section.
So here you can see 400.
The text section starts.
This is the raw data.
Raw data.
So for zero zero.
If you go to the offset of zero hour text, the section data starts and we'll be reading from here.
The amount of bytes required for this virtual cell.
So 50 hich in this example will be read from this pointer and will be in memory.
So we'll be doing that in the upcoming videos and the next location and line numbers are zero and are
only last number.
That is characteristics.
So these characteristics define whether the section is readable, readable or executable characteristics.
So this section flags here, you can see these are the flags you need to add them.
And here we have the value 60000020.
So that means the main is six.
So you get four six.
And.
Section 1132 bits that two divides.
And.
And so to zero means section contains executable code and for zero contents we have four zero.
No we don't have four zero.
So only executable.
So all of this data no need to manually pass.
So P we're already parses this information.
So starting from here to 1 to 4, you cannot go.
There is no pointer to this starting of this text.
You can just here you can see only a directory parses and shows you the information so you can see readable
and executable characteristics or address and there are cells.
So this will add 400120 to this ending size and virtual address.
What you will see is if you going to add this, you will get this result.
In the same way, if you click on this, the next section and the next section as well.
So I hope you have understood this section headers this this is also important header and if you got
confused about this base or whatever address size and size are for it and point it rather don't worry
when we are loading this.
File writes from from disk to memory, then we understand very clearly.
And sometimes I forgot to say.
What you're saying is.
Will it be greater than our size?
Because whenever you declare some global variables, then we don't grow our variables and an initial
is data, then we don't know how much those arrays could take, so we can't.
Those are very dynamic areas.
Those will grow upon the user input.
So those areas we can define how much size it will take.
So there will be extra bytes for this virtual size.
So on the disk, there is no point of storing these because we don't know those values.
So that's why the virtual size will be greater than the size of the section in the disk.
Because of this dynamic data.
So this is also one point should be remember.
So anyway, we'll be just loading the.
What you're saying is amount of bytes from the disk.