This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Permission of overlapping segments


Hi all,

In the following example I've put .text and .rodata in the first program
header and .data and .bss in the second. Unless I'm page-aligning the
.data section, linking results in two segments that overlap page 0x400000
with different/conflicting permissions as follows:

Program Header:
    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2**12
         filesz 0x00000595 memsz 0x00000595 flags r-x
    LOAD off    0x00000598 vaddr 0x00400598 paddr 0x00400598 align 2**12
         filesz 0x00000008 memsz 0x00001000 flags rw-

What should an ELF loader do here - merge permissions such that 0x400000
is rwx or is such a segment layout illegal?

Cheers,

	- Udo

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]