Here's the steps to convert from section alignment to file alignment:
But I just don't understand that, can someone elaborate with more details?
Align or alignment is a term used to describe how text is placed on the screen. For example, left-aligned text creates a straight line of text on the left side of the page (like this paragraph). Text can be aligned along the edge of a page, cell, div, table, or another visible or non-visible line.
Within Civil 3D, zoom in to where you can see both the Alignment and Profile at the same time and select an Alignment to copy. Move the copied Alignment so it is offset such that you can see it graphically. By doing this, you will see that the Profile is also copied and offset by the same amount.
Alignment is a rounded up value. Section data size is rounded up for effeciency because the OS moves stuff around in chunks anyway.
The File Alignment is usually 512 bytes which fit the blocksize of most filesystems.
The Section Alignment is usually 4096 bytes which fit the size of a memory page.
So if you have a PE-file with a section (like ".text
") that contains 513 bytes of data:
.text
will be rounded up to 1024 bytes on file..text
will be rounded up to 4096 bytes in memory.Note the amount of slack space possible both on file and in memory.
I'm unsure about why you want to "convert from one alignment to the other". The recipe you got there leaves the goal of the exercise as a mystery. If your goal is to manipulate PE-files then all you have to consider is the File Alignment. The Windows loader will handle the Section Alignment stuff when it throws it into memory, so you usually don't need to think about that at all.
You can read more about PE here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With