[9fans] executable memory map - Plan9

This is a discussion on [9fans] executable memory map - Plan9 ; Just to check I understand 386 executables on plan9. ..text is linked to the address 4096 + size of the a.out header (32 bytes) => 4096 + 32. ..data starts at the begining of the next 4096byte page after the ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [9fans] executable memory map

  1. [9fans] executable memory map

    Just to check I understand 386 executables on plan9.

    ..text is linked to the address 4096 + size of the a.out header (32 bytes) => 4096 + 32.
    ..data starts at the begining of the next 4096byte page after the .text.
    ..bss follows the data with no gap.

    On exec the a.out file is read in its entirity to virtual address
    4096 and the remainder of the file falls into place.

    The parts I am unsure of are:

    1/ Is there any padding (to a 32 bit boundry or more) between .data and .bss?

    2/ Does the a.out file contain padding to ensure .data starts on a 4k boundry
    or does the kernel's loader move .data (using memcpy() or MMU mapping)?

    Thanks.

    -Steve

  2. Re: [9fans] executable memory map

    On 7/2/07, Steve Simon wrote:

    > 2/ Does the a.out file contain padding to ensure .data starts on a 4k boundry
    > or does the kernel's loader move .data (using memcpy() or MMU mapping)?


    loader for a.out has to align the .data segment via move -- it is not
    aligned in the file.

    ron

  3. Re: [9fans] executable memory map

    > 1/ Is there any padding (to a 32 bit boundry or more) between .data and .bss?

    no.

+ Reply to Thread