On Wed, Apr 21, 2010 at 11:34:35AM -0400, Jeff Bacon wrote: > I was under the impression that for NOMMU, binary Text segments could > NOT be shared. How are you getting the kernel to share the text areas? > For me, every copy of BB is taking up a new 256kB chunk. I am running > on an ARM7TDMI, you?
Coldfire. binflat fileformat (that's what the coldfire uses). The binflat loader certainly does support sharing text segment. Of course this is using a new enough gcc (4.3.3) to use a GOT so that the actual text is never touched to perform reloacations. Only the GOT (global offset table) is modified, and each instance has their own copy of that table. I believe with older gcc versions that wasn't done, and in that case you probably can't share the text segment. This may very well be coldfire specific. No idea how arm does things. Certainly older gcc versions had serious limits on the size of programs and could easily run out of fixup table entries or chunks of code to far apart to handle. That seems to no longer be a problem. Certainly we ran into programs we could not compile before going to gcc 4.3 for the coldfire. We have never seen any problems since going to 4.3 though. I run from an initramfs ramdisk, so technically it should be able to use execute in place for the text from the ramdisk, but for some reason that doesn't currently work. So the first instance is copied to another place in ram, but that copy is then shared for all other instances. What I am using: linux 2.6.29.1 binutils 2.19.1 busybox 1.16.0 gcc 4.3.3 elf2flt (blackfin checkout from 2009/04/20, since it worked with the GOT stuff in gcc 4.3) uclibc 0.9.31 -- Len Sorensen _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev