From: James Y K. <fo...@fu...> - 2005-08-05 19:19:14
|
On Aug 5, 2005, at 11:53 AM, Thiemo Seufer wrote: > This has nothing to do with the kernel. The linker collates the NOBITS > sections (together with others) into one ELF segment with the union of > attributes. You will need a custom linker script to change that. > Yes, you're right the linker has already combined the sections before the kernel even sees it. I misread the output of readelf. However, I believe even a custom linker script would not help, as what I said above is still true (unless I'm wrong about that as well ;p). Whenever the kernel sees a section which has filesize < memsize, it appears to simply calls brk to expand the vm space, ignoring all flags on the section. binfmt_misc:769 in my kernel. Anyhow, I believe the conclusions are still valid: it does appear that a readonly progbits section works and could be used instead of an external core file. .section .foo,"xa",@progbits .space 0x300000 .end James |