From: Chris E. <cem...@ch...> - 2000-05-01 14:27:46
|
On Mon, 1 May 2000, Jeff Dike wrote: > What's going on here is that the kernel is copying its data and bss into two > files, unmapping them, and then mapping those files shared in their places. > This is to make the kernel data shared across forks. Otherwise, they would > end up copy-on-write. Ok, that makes sense. > remap_data recognizes the appropriate maps by their permissions. It > looks like another method is needed for ppc. > > It looks like there is no separate text and data in the maps. Just > text, bss, and stack. Is that right? It may be something odd about the linux binary. The maps from /bin/ls look a bit more interesting. One difference is the dynamic linking - linux seems to be static. 0fee8000-0ffc9000 r-xp 00000000 03:09 120950 /lib/libc-2.1.3.so 0ffc9000-0ffd8000 ---p 000e1000 03:09 120950 /lib/libc-2.1.3.so 0ffd8000-0ffeb000 rwxp 000e0000 03:09 120950 /lib/libc-2.1.3.so 0ffeb000-0fff0000 rwxp 00000000 00:00 0 10000000-1000c000 r-xp 00000000 03:09 30304 /bin/ls 1001b000-1001d000 rwxp 0000b000 03:09 30304 /bin/ls 30000000-30014000 r-xp 00000000 03:09 120833 /lib/ld-2.1.3.so 30014000-30015000 rw-p 00000000 00:00 0 30023000-30027000 rwxp 00013000 03:09 120833 /lib/ld-2.1.3.so 7fffe000-80000000 rwxp fffff000 00:00 0 > Why don't we just ditch the permissions comparisons and use _etext > and _end. The region between _etext and _end is the data, so just > fiddle remap_data to remap that. Do you want to do that? :-) > > Is something actually wrong here, or should it only exit if both > > remap_data("rwx") and remap_data("rw-") fail? > They both have to succeed. Ok. Chris -- Chris Emerson, obsessed Cambridge juggler E-mail: cem...@ch... Web page: http://www.chiark.greenend.org.uk/~cemerson/ |