Permission of overlapping segments
Udo A. Steinberg
us15@os.inf.tu-dresden.de
Thu Aug 9 18:20:00 GMT 2007
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20070809/284c6d81/attachment.sig>
More information about the Binutils
mailing list