1 /*
2 * Copyright (c) 2004-2010 The Trustees of Indiana University.
3 * All rights reserved.
4 * Copyright (c) 2011-2013 Los Alamos National Security, LLC.
5 * All rights reserved.
6 * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
7 * $COPYRIGHT$
8 *
9 * Additional copyrights may follow
10 *
11 * $HEADER$
12 */
13
14 #include "opal_config.h"
15
16 #include "opal/mca/dl/base/base.h"
17
18 #include "opal/mca/dl/base/static-components.h"
19
20
21 /*
22 * Globals
23 */
24 opal_dl_base_module_t *opal_dl = NULL;
25 opal_dl_base_component_t *opal_dl_base_selected_component = NULL;
26
27
28 /*
29 * Function for finding and opening either all MCA components,
30 * or the one that was specifically requested via a MCA parameter.
31 *
32 * Note that we really don't need this function -- we could specify a
33 * NULL pointer in the framework declare and the base would do this
34 * exact same thing. However, we need to have at least some
35 * executable code in this file, or some linkers (cough cough OS X
36 * cough cough) may not actually link in this .o file.
37 */
38 int opal_dl_base_open(mca_base_open_flag_t flags)
39 {
40 /* Open up all available components */
41 return mca_base_framework_components_open(&opal_dl_base_framework, flags);
42 }
43
44 /* VERY IMPORTANT: This framework is static, and is opened before any
45 other dyanmic frameworks are opened (which makes sense, of course).
46 But we must mark this framework is NO_DSO so that the MCA framework
47 base doesn't try to open any dynamic components in this
48 framework. */
49 MCA_BASE_FRAMEWORK_DECLARE(opal, dl, "Dynamic loader framework",
50 NULL /* register */,
51 opal_dl_base_open /* open */,
52 NULL /* close */,
53 mca_dl_base_static_components,
54 MCA_BASE_FRAMEWORK_FLAG_NO_DSO);