summaryrefslogtreecommitdiff
path: root/lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_load_module_2_func.txt
blob: 6b3d2b5a1fb0d06767b44dc9f1b7d5190b0eaa07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

  -spec load_module(Module, Binary) -> {module, Module} | {error, Reason}
                       when
                           Module :: module(),
                           Binary :: binary(),
                           Reason :: badfile | not_purged | on_load.

  If Binary contains the object code for module Module, this BIF
  loads that object code. If the code for module Module already
  exists, all export references are replaced so they point to the
  newly loaded code. The previously loaded code is kept in the
  system as old code, as there can still be processes executing that
  code.

  Returns either {module, Module}, or {error, Reason} if loading
  fails. Reason is one of the following:

  badfile:
    The object code in Binary has an incorrect format or the
    object code contains code for another module than Module.

  not_purged:
    Binary contains a module that cannot be loaded because old
    code for this module already exists.

  Warning:
    This BIF is intended for the code server (see code(3)) and
    is not to be used elsewhere.