X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fnative_client%2Fsrc%2Ftrusted%2Fservice_runtime%2Felf_util.c;h=14c4e1086cf5235b5d94f3ab65f443754333a105;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=b00e117b6a8730da8ec6b283b7d30556b97f41cc;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/native_client/src/trusted/service_runtime/elf_util.c b/src/native_client/src/trusted/service_runtime/elf_util.c index b00e117..14c4e10 100644 --- a/src/native_client/src/trusted/service_runtime/elf_util.c +++ b/src/native_client/src/trusted/service_runtime/elf_util.c @@ -918,9 +918,11 @@ NaClErrorCode NaClElfImageLoadDynamically( if (0 != (php->p_flags & PF_X)) { /* Load code segment. */ /* - * We make a copy of the code. This is not ideal given that - * GioMemoryFileSnapshot and NaClGioShm already have a copy of - * the file in memory or mmapped. + * We make a copy of the code. This is not ideal given that this + * code path is used only for loading the IRT, and we could assume + * that the contents of the irt.nexe file will not change underneath + * us. We should be able to mmap() the IRT's code segment instead of + * copying it. * TODO(mseaborn): Reduce the amount of copying here. */ char *code_copy = malloc(filesz);