Jeff Bacon wrote: > On 4/21/2010 11:44 AM, Jamie Lokier 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? > >> > > You can use XIP in RAM on ARM7TDMI to share text segments. > > > > On other arches, FD-PIC also works, but not on ARM at present. > > > > > > Hmm, how do you turn this on when compiling then? Is it an elf2flt flag, > or do you need a special arm toolchain built with "-fpic > -msingle-pic-base"?
I'm using: -D__PIC__ -fpic -msingle-pic-base The -D__PIC__ is probably only for old compilers. > Do you have to use RAMFS, or can this be done with the standard > ROMFS image? ROMFS on flash can do it _if_ the flash type supports direct mapping. ROMFS in RAM is possible :-) I think current kernels share automatically when there are multiple instances of a text segment (any read-only file mapping), no matter how they are stored. But I'm not sure about this. -- Jamie _______________________________________________ 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