1 : /*
2 : * Copyright (c) 2014 The Native Client Authors. All rights reserved.
3 : * Use of this source code is governed by a BSD-style license that can be
4 : * found in the LICENSE file.
5 : */
6 :
7 : #include "native_client/src/trusted/service_runtime/sel_main_common.h"
8 :
9 : #include "native_client/src/shared/platform/nacl_check.h"
10 : #include "native_client/src/trusted/service_runtime/sel_ldr.h"
11 :
12 5 : NaClErrorCode NaClMainLoadIrt(struct NaClApp *nap, struct NaClDesc *nd,
13 : struct NaClValidationMetadata *metadata) {
14 : NaClErrorCode errcode;
15 5 : errcode = NaClAppLoadFileDynamically(nap, nd, metadata);
16 5 : if (errcode != LOAD_OK) {
17 0 : return errcode;
18 : }
19 5 : CHECK(NULL == nap->irt_nexe_desc);
20 5 : NaClDescRef(nd);
21 5 : nap->irt_nexe_desc = nd;
22 5 : return LOAD_OK;
23 : }
|