Chromium Code Reviews| Index: src/trusted/service_runtime/sel_main_chrome.c |
| diff --git a/src/trusted/service_runtime/sel_main_chrome.c b/src/trusted/service_runtime/sel_main_chrome.c |
| index 35dfa02a120fd8a4400c750dbf7c775d798a5766..781aaa0f6ae397fdb7b454446edb3763026f1395 100644 |
| --- a/src/trusted/service_runtime/sel_main_chrome.c |
| +++ b/src/trusted/service_runtime/sel_main_chrome.c |
| @@ -30,6 +30,7 @@ |
| #include "native_client/src/trusted/service_runtime/nacl_all_modules.h" |
| #include "native_client/src/trusted/service_runtime/nacl_debug_init.h" |
| #include "native_client/src/trusted/service_runtime/nacl_signal.h" |
| +#include "native_client/src/trusted/service_runtime/nacl_text.h" |
| #include "native_client/src/trusted/service_runtime/osx/mach_exception_handler.h" |
| #include "native_client/src/trusted/service_runtime/sel_addrspace.h" |
| #include "native_client/src/trusted/service_runtime/sel_ldr.h" |
| @@ -281,7 +282,19 @@ void NaClChromeMainStart(struct NaClChromeMainArgs *args) { |
| } |
| /* Load the integrated runtime (IRT) library. */ |
| - NaClLoadIrt(nap, args->irt_fd); |
| + /* We check if there is a segment gap before trying to load the IRT. This |
|
Mark Seaborn
2012/06/28 22:05:11
The comment style is
/*
* blah
* blah
*/
Can y
jvoung (off chromium)
2012/06/28 22:41:56
Done.
|
| + * is to support IRT-less / segment-gap-free PNaCl translator nexes. |
| + * We should plumb through a flag from Chrome in such cases, instead of |
|
Mark Seaborn
2012/06/28 22:05:11
Can you make this: "TODO(mseaborn): Plumb through
jvoung (off chromium)
2012/06/28 22:41:56
Done.
|
| + * looking for the absence of a segment gap, to provide better diagnostics |
| + * when the linker did not create a segment gap! |
| + */ |
| + if (NaClHasSegmentGapForDyncode(nap)) { |
| + NaClLoadIrt(nap, args->irt_fd); |
| + } else { |
| + NaClLog(LOG_WARNING, |
| + "NaCl app doesn't have a segment gap, not loading IRT.\n" |
|
Mark Seaborn
2012/06/28 22:05:11
'executable' rather than 'app'? "Main executable
jvoung (off chromium)
2012/06/28 22:41:56
Done.
|
| + "This is expected for PNaCl's translator nexes.\n"); |
| + } |
| NaClEnvCleanserCtor(&env_cleanser, 1); |
| if (!NaClEnvCleanserInit(&env_cleanser, envp, NULL)) { |